Warn about old perl versions, which have broken __PACKAGE__
authorJamie Cameron <jcameron@webmin.com>
Thu, 5 Mar 2009 21:06:10 +0000 (21:06 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 5 Mar 2009 21:06:10 +0000 (21:06 +0000)
miniserv.pl

index eef67d7..532a650 100755 (executable)
@@ -300,7 +300,7 @@ foreach $pl (split(/\s+/, $config{'premodules'})) {
                ($dir, $mod) = (undef, $pl);
                }
        push(@INC, "$config{'root'}/$dir");
-       eval "package main; use $mod ()";
+       eval "package $mod; use $mod ()";
        if ($@) {
                print STDERR "Failed to pre-load $mod : $@\n";
                }