Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
[marto]: so I have to work Saturday, which is good and bad. Bad in the sense that I have to be hear early :( Good in that I am here only as support for another client project, so I get to spend the day working on my personal 'ToDo' list, without the kids :P
[Corion]: marto: Ooof - but yes, being there as only second level support or third level support is good and if you have enough things that you can work on, it won't be a wasted (if paid) day

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-02-28 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (399 votes). Check out past polls.