Help for this page

Select Code to Download


  1. or download this
           Failures in DESTROY()
    
    ...
           lier versions of Perl, unless someone happened to be looking in
    + $@ just
           after the point the destructor happened to run.  Such failures 
    +are now
           visible as warnings when warnings are enabled.
    
  2. or download this
    $ perl -wle 'sub DESTROY { die "dead" }; { bless \my $o }'
            (in cleanup) dead at -e line 1.
    
  3. or download this
           (in cleanup) %s
               (W misc) This prefix usually indicates that a DESTROY() met
    +hod
    ...
               often a vast number of times, the warning is issued only on
    +ce for
               any number of failures that would otherwise result in the s
    +ame
               message being repeated.
    
  4. or download this
    $ perl -wle 'sub DESTROY { die "dead" }; { bless \my $o; bless \my $p 
    +}'
            (in cleanup) dead at -e line 1.
    ...
    $ perl -wle 'sub DESTROY { die "dead: $_[0]"}; { bless \my $o; bless \
    +my $p }'
            (in cleanup) dead: main=SCALAR(0x805f0d4) at -e line 1.
            (in cleanup) dead: main=SCALAR(0x805f164) at -e line 1.
    
  5. or download this
    $ perl -wle 'my $c=0; sub DESTROY { die "dead: ",$c++; }; { bless \my 
    +$o; bless \my $p }'
            (in cleanup) dead: 0 at -e line 1.
            (in cleanup) dead: 1 at -e line 1.