diff options
author | Richard Levitte <levitte@openssl.org> | 2017-08-01 22:10:39 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-08-15 11:30:47 +0200 |
commit | cb6afcd6ee0c0d66fae62e13fe5966171992f81c (patch) | |
tree | 5b793c0d2a0e92233919fcaaa314c70cf32430d2 /util/dofile.pl | |
parent | c4d2e483a39176a476c56d35879423fe6e33c0cd (diff) |
Consolidate the locations where we have our internal perl modules
Instead of having perl modules under test/testlib, util and util/perl,
consolidate them all to be inside util/perl.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4069)
Diffstat (limited to 'util/dofile.pl')
-rw-r--r-- | util/dofile.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/dofile.pl b/util/dofile.pl index 0d05574667..36827e350a 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/; @@ -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(); |