I've seen something exactly like that. It helped when dev, staging, and test all had the lib in different locations...
On Wed, Mar 14, 2012 at 5:04 PM, G. Wade Johnson <[email protected]> wrote: > On Wed, 14 Mar 2012 10:44:13 -0500 > Bryan Rivera <[email protected]> wrote: > > > Has anyone ever seen something like the code snippet below? I came > > across this and figured I was just missing something. Why would you > > want to 'use lib' inside an eval inside a BEGIN block? I think it's > > all kinds of wrong. > > > > BEGIN { > > eval "{ use lib '/usr/prod/xxx/xxx/perl/lib/'; }"; > > } > > The only reason I can think of is pretty unrealistic. > > This construct would protect against the lib.pm module failing and > still execute at compile time. > > I would think that if you expected 'lib' to fail to load, there would > not be much else you could do. So, I can't see a legitimate reason to > do it. > > But, someone obviously thought there was a reason... > > G. Wade > -- > The man who says he is willing to meet you halfway is usually a poor > judge of distance. -- Laurence J. Peter > _______________________________________________ > Houston mailing list > [email protected] > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ >
_______________________________________________ Houston mailing list [email protected] http://mail.pm.org/mailman/listinfo/houston Website: http://houston.pm.org/
