[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Quine and idea



On May 22, Philip Newton said:

>kpreid@attglobal.net wrote:
>> # Has this been done already?
>
>Probably not, since it's not very Fun:
>
>    IO::File=GLOB(0x1b95050)
>
>is the output I get from it.

Um, that's the point.  Notice how you never 'use'd the IO::File module,
yet you called IO::File->new and created an object?

That's what his code does.  Auto-use's a module whenever its new method is
called.  Only works for classes whose file is of the same name (like
IO::File is in IO/File.pm, but IO::Socket::INET is in IO/Socket.pm unless
something's changed...).

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
** I need a publisher for my book "Learning Perl's Regular Expressions" **


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe