Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Passing DATA filehandle to a module under strict

by tobyink (Abbot)
on Jan 26, 2012 at 13:45 UTC ( #950088=note: print w/replies, xml ) Need Help??

in reply to Re: Passing DATA filehandle to a module under strict
in thread Passing DATA filehandle to a module under strict

If the tool gets in your way of whatever you are doing, disable the tool for the time being.

Indeed, but when disabling strict, try to take advantage of the fact that strict is scoped, so you should disable it in the smallest scope possible. And no strict can take various arguments to control which parts of it you're disabling.

use strict; sub _foo { ... } LAX: { $caller = caller; no strict 'refs'; *{"$caller\::foo"} = \&_foo; }

'refs' is pretty much the only part of strict that it's ever a good idea to disable.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950088]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2016-09-29 16:12 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (555 votes). Check out past polls.