From: Jarkko Hietaniemi Date: Fri, 11 Jan 2002 13:53:49 +0000 (+0000) Subject: Forgot from #14179. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f7409f648718a929113b7e44dd26e2ff8526ee0;p=p5sagit%2Fp5-mst-13.2.git Forgot from #14179. p4raw-id: //depot/perl@14180 --- diff --git a/lib/Pod/InputObjects.pm b/lib/Pod/InputObjects.pm index 079a40b..eae8678 100644 --- a/lib/Pod/InputObjects.pm +++ b/lib/Pod/InputObjects.pm @@ -268,7 +268,7 @@ sub new { ## If they are in the argument list, they will override the defaults. my $self = { -name => undef, - -text => (@_ == 1) ? $_[0] : undef, + -text => (@_ == 1) ? shift : undef, -file => '', -line => 0, -prefix => '=', @@ -892,7 +892,7 @@ sub _unset_child2parent_links { my $self = shift; local *ptree = $self; for (@ptree) { - next unless (length and ref and ref ne 'SCALAR'); + next unless (defined and length and ref and ref ne 'SCALAR'); $_->_unset_child2parent_links() if UNIVERSAL::isa($_, 'Pod::InteriorSequence'); } diff --git a/lib/Pod/t/InputObjects.t b/lib/Pod/t/InputObjects.t index ad5bade..d086086 100644 --- a/lib/Pod/t/InputObjects.t +++ b/lib/Pod/t/InputObjects.t @@ -1,4 +1,4 @@ -#!perl +#!perl -Tw BEGIN { chdir 't' if -d 't'; @@ -37,7 +37,7 @@ use_ok( 'Pod::InputObjects' ); is( $p_p1->cmd_name(), 'head2', 'Pod::Paragraph->cmd_name()' ); is( $p_p1->cmd_name( 'head1' ), 'head1', 'Pod::Paragraph->cmd_name( head1 )' ); - is( $p_p2->cmd_name(), '', + cmp_ok( $p_p2->cmd_name(), 'eq', '', 'Pod::Paragraph->cmd_name() revisited' ); is( $p_p1->text(), 'NAME', 'Pod::Paragraph->text()' );