Skip to content

Commit

Permalink
do not try printing undef
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Jun 22, 2015
1 parent f7aae06 commit 3f9ec86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pod/perlobj.pod
Expand Up @@ -148,10 +148,10 @@ demonstrated with this code:
my $bar = $foo;

bless $foo, 'Class';
print blessed( $bar ); # prints "Class"
print blessed( $bar ) // 'not blessed'; # prints "Class"

$bar = "some other value";
print blessed( $bar ); # prints undef
print blessed( $bar ) // 'not blessed'; # prints "not blessed"

When we call C<bless> on a variable, we are actually blessing the
underlying data structure that the variable refers to. We are not
Expand Down

0 comments on commit 3f9ec86

Please sign in to comment.