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

[FWP] Re: Whether to laugh or cry



Mark-Jason Dominus <mjd@plover.com> writes:

> Something I suggest in one of my tutorials is
> 
>         sub carp {
>           require Carp;
>           *carp = \&Carp::carp;
>           goto &carp;
>         }
> 
> And that way you don't have to load the carp module unless (and until)
> you actually need it.  

Hmmm.  "goto &{*carp = \&Carp::carp}" would appear to be More Fun.

Trampoline golf, anyone?  One possibility would be to have Carp return 
\&carp; then "goto &{*carp = require Carp}" would (appear to) work.

-- 
Ariel Scolnicov        |"GCAAGAATTGAACTGTAG"            | ariels@compugen.co.il
Compugen Ltd.          |Tel: +972-2-6795059 (Jerusalem)	\ We recycle all our Hz
72 Pinhas Rosen St.    |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555    http://3w.compugen.co.il/~ariels

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