X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FNode.pm;h=9d2f5c784fef3cc62eacaf16d7da4ed4c6932002;hp=f912b94217a843c7d62477c3f1d25db8b9fd71c3;hb=1d9e1ab49a01c412515e93b36f92a41590d8ab56;hpb=5d9ea7c3f763b8eaaa92aff0e607be9811a15c2e diff --git a/lib/ZOOM/IRSpy/Node.pm b/lib/ZOOM/IRSpy/Node.pm index f912b94..9d2f5c7 100644 --- a/lib/ZOOM/IRSpy/Node.pm +++ b/lib/ZOOM/IRSpy/Node.pm @@ -6,6 +6,7 @@ use 5.008; use strict; use warnings; +use Scalar::Util; =head1 NAME @@ -57,13 +58,15 @@ changed. sub new { my $class = shift(); my($name, @subnodes) = @_; - return bless { + my $this = bless { name => $name, subnodes => \@subnodes, address => undef, # filled in by resolve() previous => undef, # filled in by resolve() next => undef, # filled in by resolve() }, $class; + + return $this; } =head2 name()