Re: Mason 1.33 barring any objections?
David Wheeler <[email protected]> Mon, 22 May 2006 10:23:53 -0700
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
On May 22, 2006, at 10:21, David Wheeler wrote:
> Probably not. Note that MJD changed things in HOP so that they
> don't use _() as a custom function anymore. Here are his notes on
> the why and wherefore of the change:
>
> http://hop.perl.plover.com/errata/byid.cgi/131
> http://hop.perl.plover.com/~alias/list.cgi?2:mss:264
Dominus also sent me a note in reply to your comment, Dave:
> If you want a "super-global" thingy, all
> you have to do is use a name that starts with "::".
>
> package A;
>
> sub ::foo { ... }
>
> package B;
>
> if (::foo(...)) { ... } # Calls ::foo regardless of where it was
> defined
>
> package C;
>
> if (::foo(...)) { ... } # Calls the same ::foo as the previous
>
> package D;
>
> sub ::foo { ... } # Compile-time subroutine redefinition warning
> Alternatively, for variables, you can use the special ${^...}
> notation:
>
> package A;
>
> ${^Foo} = 1;
>
> package B;
>
> print ${^Foo}; # Prints 1
>
> package C;
>
> ${^Foo} = 2;
>
> package D;
>
> print ${^Foo}; # Prints 2
Cheers,
David
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642