$NetBSD$ Can't locate getopt.pl in @INC (@INC contains: /usr/pkg/lib/perl5/site_perl/5.16.0/x86_64-netbsd-thread-multi /usr/pkg/lib/perl5/site_perl/5.16.0 /usr/pkg/lib/perl5/vendor_perl/5.16.0/x86_64-netbsd-thread-multi /usr/pkg/lib/perl5/vendor_perl/5.16.0 /usr/pkg/lib/perl5/5.16.0/x86_64-netbsd-thread-multi /usr/pkg/lib/perl5/5.16.0 .) at ../bin/perload line 40. *** Error code 2 --- bin/perload.orig 2001-03-18 03:31:36.000000000 +0900 +++ bin/perload 2013-06-14 23:31:04.000000000 +0900 @@ -37,8 +37,10 @@ $current_package = 'main'; # Current pa $init_emitted = 0; # True when dataloading stamp was emitted $in_function = 0; -require 'getopt.pl'; -&Getopt; +use Getopt::Std; +our(%opts); + +getopts('to', \%opts); while (<>) { if ($. == 1 && /^(:|#).*perl/) { # Invocation stub @@ -198,7 +200,7 @@ if (@auto > 0) { : } : close FILE; EOC - if ($opt_t) { + if ($opts{'t'}) { print &q(<<'EOC'); : # Untaint body when running setuid : $body =~ /^([^\0]*)/; @@ -276,7 +278,7 @@ if (@Data > 0) { : local($*) = 1; : die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/; EOC - if ($opt_t) { + if ($opts{'t'}) { print &q(<<'EOC'); : # Untaint body when running setuid : $body =~ /^([^\0]*)/; @@ -293,7 +295,7 @@ EOC :} : EOC - print &q(<<'EOC') unless $opt_o; + print &q(<<'EOC') unless $opts{'o'}; :# Parse text after the END token and record defined loadable functions (i.e. :# those whose name starts with load_) into the %Datapos array. Such function :# definitions must be left adjusted. Stop as soon as the function we want @@ -322,7 +324,7 @@ EOC :} : EOC - print &q(<<'EOC') if $opt_o; + print &q(<<'EOC') if $opts{'o'}; :# This function is called only once, and fills in the %Datapos array with :# the offset of each of the dataloaded routines held in the data section. :sub perload'fetch_function_code { @@ -359,7 +361,7 @@ EOC # Option -o directs us to optimize the function location by emitting an # offset table, which lists all the position within DATA for each possible # dataloaded routine. - if ($opt_o) { + if ($opts{'o'}) { print &q(<<'EOC'); :# :# DO NOT CHANGE A IOTA BEYOND THIS COMMENT!