Re: Mason 1.33 barring any objections?
Dave Rolsky <[email protected]> Sun, 21 May 2006 22:29:29 -0500 (CDT)
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 21 May 2006, jesse wrote:
> I've actually got one minor thing I'd been meaning to ask about. It's
> not serious enough to hold up 1.33, but it'd make me a happy camper to
> fix it.
>
> Lines 98-101 or so of Mason/Compiler/ToObject.pm read:
>
> if (defined $file && !-f $file) {
> my ($dirname) = dirname($file);
> if (!-d $dirname) {
> unlink($dirname) if (-e _);
>
>
> Because of the magical nature of sub _ {}, this causes weird
> behaviour when another module defines a sub _. Is there any particular
> reason that code is as it is?
Well, the usual reason for using "_" like that is that it's faster because
it saves a stat() call. I've gotten in the habit of just using whenever i
can, for one.
What is the magical nature of defining a "sub _ {}" anyway? I can't find
any docs about this in the perlsub pod.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/
-------------------------------------------------------
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