Created
September 11, 2014 04:40
-
-
Save exodist/45b8cf32780a5dd7a66b to your computer and use it in GitHub Desktop.
Whoa!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
{ | |
package Foo; | |
sub finish { | |
$_[0] = undef; | |
} | |
sub DESTROY { | |
print "Bye Bye\n"; | |
} | |
} | |
my $one = bless {}, 'Foo'; | |
print "A: $one\n"; | |
$one->finish; | |
print "B: $one\n"; | |
__END__ | |
perl test.pl | |
A: Foo=HASH(0x2123148) | |
Bye Bye | |
Use of uninitialized value $one in concatenation (.) or string at test.pl line 22. | |
B: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment