From: Gurusamy Sarathy Date: Tue, 25 Jan 2000 01:31:27 +0000 (+0000) Subject: more fixes for warnings from change#4840 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=228a48a57c3bb7d44e123c9219501dcb136fe191;p=p5sagit%2Fp5-mst-13.2.git more fixes for warnings from change#4840 p4raw-link: @4840 on //depot/perl: 2a28b791c040b17cd26931dd9a159635db5fe244 p4raw-id: //depot/perl@4883 --- diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 6f3d056..c2f8865 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -459,7 +459,7 @@ END_OF_HEAD process_head( $1, $2, $doindex && $index ); } elsif (/^=item\s*(.*\S)?/sm) { # =item text warn "$0: $podfile: =item without bullet, number or text" - . " in paragraph $paragraph.\n" if $1 eq ''; + . " in paragraph $paragraph.\n" if !defined($1) or $1 eq ''; process_item( $1 ); $after_item = 1; } elsif (/^=over\s*(.*)/) { # =over N @@ -1394,6 +1394,7 @@ sub process_text1($$;$){ $lev++ unless defined $func; my $res = ''; + $func ||= ''; if( $func eq 'B' ){ # B - boldface $res = '' . process_text1( $lev, $rstr ) . ''; @@ -1785,13 +1786,13 @@ sub coderef($$){ my( $url ); my $fid = fragment_id( $item ); - + return( $url, $fid ); if( defined( $page ) ){ # we have been given a $page... $page =~ s{::}{/}g; # Do we take it? Item could be a section! - my $base = $items{$fid}; + my $base = $items{$fid} || ""; $base =~ s{[^/]*/}{}; if( $base ne "$page.html" ){ ### print STDERR "coderef( $page, $item ): items{$fid} = $items{$fid} = $base => discard page!\n"; @@ -1811,7 +1812,7 @@ sub coderef($$){ # =item directive, then create a link to that page. if( defined $page ){ if( $page ){ - if( $pages{$page} =~ /([^:.]*)\.[^:]*:/){ + if( exists $pages{$page} and $pages{$page} =~ /([^:.]*)\.[^:]*:/){ $page = $1 . '.html'; } my $link = "$htmlroot/$page#item_$fid"; @@ -1900,6 +1901,7 @@ sub depod($){ sub depod1($;$){ my( $rstr, $func ) = @_; my $res = ''; + return $res unless defined $$rstr; if( ! defined( $func ) ){ # skip to next begin of an interior sequence while( $$rstr =~ s/\A(.*?)([BCEFILSXZ]) - convert to character $$rstr =~ s/^(\w+)>//; - $res .= $E2c{$1}; + $res .= $E2c{$1} || ""; } elsif( $func eq 'X' ){ # X<> - ignore $$rstr =~ s/^[^>]*>//; @@ -1978,7 +1980,7 @@ sub fragment_id { sub make_URL_href($){ my( $url ) = @_; if( $url !~ - s{^(http:[-\w/#~:.+=&%@!]+)(\?.*)?$}{$1}i ){ + s{^(http:[-\w/#~:.+=&%@!]+)(\?.*)$}{$1}i ){ $url = "$url"; } return $url;