Re: strict irony
From: Jay Tilton (tiltonj_at_erols.com)
Date: 04/11/04
- Next message: Mike Mimic: "Re: Regexp guestion"
- Previous message: Matt Garrish: "Re: strict irony"
- In reply to: J Krugman: "strict irony"
- Next in thread: Jeff 'japhy' Pinyan: "Re: strict irony"
- Reply: Jeff 'japhy' Pinyan: "Re: strict irony"
- Reply: Matt Garrish: "Re: strict irony"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 11 Apr 2004 15:51:26 GMT
J Krugman <jkrugman@yahbitoo.com> wrote:
: use strict;
:
: print "Ain't it ironic?\n" if strict;
: print "The things you learn...\n" if BAREWORD;
: print "What's going on here?\n" if bewildered;
:
: # but if this line is uncommented, script won't compile:
: # my $x = BAREWORD;
The 'if' modifiers are being optimized away. Why the optimizing phase
would turn a blind eye to barewords under strict subs, I don't know.
Compounding the mystery, adding "use warnings;" causes the missing
"Bareword not allowed" compilation errors to surface. Changing 'if' to
'unless' causes compilation errors as well.
A most curious discovery.
- Next message: Mike Mimic: "Re: Regexp guestion"
- Previous message: Matt Garrish: "Re: strict irony"
- In reply to: J Krugman: "strict irony"
- Next in thread: Jeff 'japhy' Pinyan: "Re: strict irony"
- Reply: Jeff 'japhy' Pinyan: "Re: strict irony"
- Reply: Matt Garrish: "Re: strict irony"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|