[pm-h] madness, genius or confusion?

S Z zappepcs at gmail.com
Fri Mar 16 08:14:07 PDT 2012


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 <gwadej at anomaly.org> wrote:

> On Wed, 14 Mar 2012 10:44:13 -0500
> Bryan Rivera <brivera001 at gmail.com> 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
> Houston at pm.org
> http://mail.pm.org/mailman/listinfo/houston
> Website: http://houston.pm.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/mailman/private/houston/attachments/20120316/8b7b2543/attachment.html>


More information about the Houston mailing list