Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: strict refs

by Krambambuli (Deacon)
on Oct 28, 2008 at 09:13 UTC ( #719942=note: print w/ replies, xml ) Need Help??


in reply to strict refs

The following works for me:

foreach (@{ $DBI::EXPORT_TAGS{sql_types} }) { my $ref = \&{"DBI::$_"}; printf "%s=%d\n", $_, &$ref; }
It is documented in strict:
There is one exception to this rule: $bar = \&{’foo’}; &$bar; is allowed so that "goto &$AUTOLOAD" would not break unde +r stricture.
Hth,

Krambambuli
---


Comment on Re: strict refs
Select or Download Code
Re^2: strict refs
by LesleyB (Friar) on Oct 28, 2008 at 09:35 UTC

    Yes, Krambabuli, it does help and it does work for me too.

    Thank you for pointing out the documentation on it

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-10-24 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (130 votes), past polls