[lug] Perl question

Carl Wagner carl.wagner at verbalworld.com
Wed Apr 8 11:29:15 MDT 2009


Thanks Zan and Tom.

Sorry for the delay in responding.  I was working to fix a related problem.

Anyone know when Debian Etch will upgrade to Perl 5.10?

Thanks,
Carl.


Zan Lynx wrote:
> On Mon, 2009-04-06 at 19:50 -0600, Tom Christiansen wrote:
>   
>> In-Reply-To: Message from Zan Lynx <zlynx at acm.org> 
>>    of "Mon, 06 Apr 2009 18:04:17 MDT." <49DA9881.1060501 at acm.org> 
>>
>>     
>>> Any "use" statements must be inside the scope of the "package" that 
>>> wants to use them.  What is probably happening is something like this:
>>>       
>> That's not really accurate.  If the "use" on a regular module triggers an
>> import, then yes, those exports will (likely) go into the namespace of
>> the caller's compile-time package.  However, there are also "use"
>> statements that have no affect on the package, but rather on the caller's
>> enclosing lexical scope, something that's orthogonal (=utterly unrelated)
>> to its package.  Witness:
>>
>>     % perl -le 'use bignum; print 123->is_odd; package Other; print 245->is_odd'
>>     1
>>     1
>>
>> The Switch.pm module is yet a different sort of beast altogether, and 
>> pretty nasty about it, too.  Have you *looked* at its import() method?
>>     
>
> Nope.  I just assumed it was a package scope problem because I have run
> into so many of those.
>
> I had no idea Perl could be so screwed up! :-)
>
> Actually I should be amazed that can be made to work at all.
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug



More information about the LUG mailing list