Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Perl best practices fanatism

by chromatic (Archbishop)
on Dec 09, 2007 at 06:15 UTC ( #655932=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl best practices fanatism
in thread Perl best practices fanatism

I have testing code (Parrot::Test, for example) that sometimes needs to mark a test as TODO, but for various reasons can't set the appropriate package variable. In the case of Parrot, this is because the code being tested is not Perl. Thus the library contains a line something like:

local ${ $package . '::TODO' } = $opts{todo} if $opts{todo};

This construct is very different than the conditional declaration of a lexical variable because local only controls the visibility of a symbol's binding. The unbinding always occurs at the end of the scope if the conditional is true. Unlike lexical bindings, the false condition does not interfere with unbinding.

xdg is right, and it does appear fixed. Nice!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655932]
help
Chatterbox?
[Corion]: Meh... Github (understandably) doesn't allow files larger than 100MB, but my rebase of an older repo (from Github) includes such a file and now I can't push my changes there
[Corion]: Maybe that is the push I need to finally try out Gitprep ;)
[Corion]: On the upside, I should finally improve Image::CCV to also do ImageNet classification using their pretrained parameters
[Lady_Aleena]: Hello Corion.
[Corion]: Hi Lady_Aleena!
[Lady_Aleena]: Corion, how are things?
[Corion]: Lady_Aleena: Quite good ;) I'm working four days now, instead of five, which helps my mood and my weekends tremendously

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2017-09-24 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (274 votes). Check out past polls.

    Notices?