develooper Front page | perl.perl6.language | Postings from July 2002

Re: What's MY.line?

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
July 10, 2002 15:12
Subject:
Re: What's MY.line?
Message ID:
slrnaipc8i.j3d.rgarciasuarez@rafael.example.com
Chip Salzenberg wrote in perl.perl6.language :
> In (re?)examining the Apocalypses, I've found something that confuses me a
> bit.  A2 refers to C<MY> as a "pseudopackage" and says:
> 
>     __LINE__   becomes   MY.line
>     __FILE__      "      MY.file
> 
[...]
> 
> With regard to C<MY>:
> 
>    2. What are "line" and "file"?  Properties?  Class variables?
>       (Probably not class variables since C<MY> is not called a class.)

That's the implementation problem ;-)
In perl 5, __LINE__, __FILE__ and __PACKAGE__ are replaced at
compile-time (in fact, at tokenizing-time) by the appropriate constants.
The question is : to which kind of bytecode MY.file (etc.) get compiled ?

-- 
Rafael Garcia-Suarez : http://use.perl.org/~rafael/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About