Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: use Switch wierdness

by runrig (Abbot)
on Aug 24, 2012 at 22:28 UTC ( #989650=note: print w/ replies, xml ) Need Help??


in reply to use Switch wierdness

Switch is a bug (this statement is an exaggeration, but see Categorized Damian Modules...maybe 'Switch is a bug waiting to happen'??). Don't use it in production. Even if it was (mistakenly) once a core library. (if you're not using it or considering using it for any serious purpose and just experimenting, please state that in your post...sorry and move along).


Comment on Re: use Switch wierdness
Re^2: use Switch wierdness
by tqisjim (Beadle) on Aug 25, 2012 at 01:35 UTC

    It's not just the Switch module that breaks this. Other modules seem to have the same effect. Can someone else run this code and confirm if they have the same problem?

    use DBD::mysql ; $perldata = bless { hello => 'world' }, 'superman' ; # $perldata = { hello => 'world' } ; sub test { my $o = shift ; warn $o ; my $m = bless { perldata => $o }, 'TQIS::test' ; return $m ; } sub TQIS::test::DESTROY { my $self = shift ; warn $self->{perldata} ; } $a = test( $perldata ) ; $b = test( $perldata ) ; $c = test( $perldata ) ;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-12-20 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls