in reply to Re^2: Code from perlboot not working as expected
in thread Code from perlboot not working as expected
my $self = shift; my $class = ref($self) || $self;
If $self contains a blessed reference, ref will return the package name. If it contains a string, ref will return undef and hence the || will return the original string.
I personally prefer perltoot to perlboot. But both are certainly worth working through.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Code from perlboot not working as expected
by davies (Monsignor) on May 17, 2010 at 15:10 UTC |