X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fdofile.pl;h=0f2e8f0b53e2ee2c0103943df244ffe1aac6fa6d;hp=0d05574667e463758f91f0da42ca63d58356027b;hb=b26d696c95244055eed634129cd8316a1b298577;hpb=44e699515568abcae0e77d7315f9b5e393daa6d9 diff --git a/util/dofile.pl b/util/dofile.pl index 0d05574667..0f2e8f0b53 100644 --- a/util/dofile.pl +++ b/util/dofile.pl @@ -14,6 +14,7 @@ use strict; use warnings; +use FindBin; use Getopt::Std; # We actually expect to get the following hash tables from configdata: @@ -38,7 +39,7 @@ package OpenSSL::Template; # a fallback in case it's not installed on the system use File::Basename; use File::Spec::Functions; -use lib catdir(dirname(__FILE__)); +use lib "$FindBin::Bin/perl"; use with_fallback qw(Text::Template); #use parent qw/Text::Template/; @@ -105,7 +106,7 @@ sub quotify1 { # quotify_l LIST # For each defined element in LIST (i.e. elements that aren't undef), have -# it quotified with 'quotofy1' +# it quotified with 'quotify1' sub quotify_l { map { if (!defined($_)) { @@ -175,7 +176,10 @@ my $text = # Load the full template (combination of files) into Text::Template # and fill it up with our data. Output goes directly to STDOUT -my $template = OpenSSL::Template->new(TYPE => 'STRING', SOURCE => $text ); +my $template = + OpenSSL::Template->new(TYPE => 'STRING', + SOURCE => $text, + PREPEND => qq{use lib "$FindBin::Bin/perl";}); sub output_reset_on { $template->output_reset_on();