## 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 => '<unknown-file>',
-line => 0,
-prefix => '=',
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');
}
-#!perl
+#!perl -Tw
BEGIN {
chdir 't' if -d 't';
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()' );