diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-24 09:40:24 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-24 09:40:24 +0000 |
commit | 548da3d2226362a0902abd52eeecaeeaccb0a978 (patch) | |
tree | e0ae22a3c3079fb24d3730575acd132875cb622c /lib/AutoSplit.pm | |
parent | ef7f72ff4bf79873c36de403afb6e50efdeafa7e (diff) | |
download | perl-548da3d2226362a0902abd52eeecaeeaccb0a978.tar.gz |
avoid warnings when there's no subs to autosplit
p4raw-id: //depot/perl@4873
Diffstat (limited to 'lib/AutoSplit.pm')
-rw-r--r-- | lib/AutoSplit.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index 3cb01a1d52..936edc4758 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 |