From 548da3d2226362a0902abd52eeecaeeaccb0a978 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Mon, 24 Jan 2000 09:40:24 +0000 Subject: [PATCH] avoid warnings when there's no subs to autosplit p4raw-id: //depot/perl@4873 --- lib/AutoSplit.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.7.4