From: Gurusamy Sarathy Date: Mon, 24 Jan 2000 09:40:24 +0000 (+0000) Subject: avoid warnings when there's no subs to autosplit X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=548da3d2226362a0902abd52eeecaeeaccb0a978;p=p5sagit%2Fp5-mst-13.2.git avoid warnings when there's no subs to autosplit p4raw-id: //depot/perl@4873 --- diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index 3cb01a1..936edc4 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -352,8 +352,10 @@ EOT } $last_package = $this_package if defined $this_package; } - print OUT @cache,"1;\n# end of $last_package\::$subname\n"; - close(OUT); + if ($subname) { + print OUT @cache,"1;\n# end of $last_package\::$subname\n"; + close(OUT); + } close(IN); if (!$keep){ # don't keep any obsolete *.al files in the directory