On Thu, Aug 30, 2001 at 10:52:27PM -0700, Brent Dax wrote:
> # Already got that.
> #
> #     use Fcntl qw(:seek);
> #     seek DATA, 0, SEEK_SET;
> #     @code = <DATA>;
> 
> IMHO, that's too hackish--just reading that doesn't make what you're
> doing obvious.  An explicit $*CODE filehandle would make more sense to
> the uninitiated.

    sub my_code {
        use Fcntl qw(:seek);
        seek DATA, 0, SEEK_SET;
        return <DATA>;
    }

Stick that in a module, slap on some docs and you're all set.  Geeez,
that's what modules are for!

I thought we actually wanted to get something done, not sit around
saying "Everything will be perfect when Perl 6 comes!"


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
"Let's face it," said bearded Rusty Simmons, opening a can after the
race.  "This is a good excuse to drink some beer."  At 10:30 in the
morning?  "Well, it's past noon in Dublin," said teammate Mike
[Joseph] Schwern.  "It's our duty."
    -- "Sure, and It's a Great Day for Irish Runners" 
       Newsday, Sunday, March 20, 1988

Reply via email to