Deleted Added
full compact
dofile.pl (1.1.1.3) dofile.pl (1.1.1.1)
1#! /usr/bin/env perl
1#! /usr/bin/env perl
2# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
2# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the OpenSSL license (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9# Reads one or more template files and runs it through Text::Template
10#
11# It is assumed that this scripts is called with -Mconfigdata, a module
12# that holds configuration data in %config
13
14use strict;
15use warnings;
16
3#
4# Licensed under the OpenSSL license (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9# Reads one or more template files and runs it through Text::Template
10#
11# It is assumed that this scripts is called with -Mconfigdata, a module
12# that holds configuration data in %config
13
14use strict;
15use warnings;
16
17use FindBin;
18use Getopt::Std;
19
20# We actually expect to get the following hash tables from configdata:
21#
22# %config
23# %target
24# %withargs
25# %unified_info

--- 8 unchanged lines hidden (view full) ---

34# http://search.cpan.org/~mjd/Text-Template-1.46/lib/Text/Template.pm#Automatic_postprocessing_of_template_hunks
35
36package OpenSSL::Template;
37
38# Because we know that Text::Template isn't a core Perl module, we use
39# a fallback in case it's not installed on the system
40use File::Basename;
41use File::Spec::Functions;
17use Getopt::Std;
18
19# We actually expect to get the following hash tables from configdata:
20#
21# %config
22# %target
23# %withargs
24# %unified_info

--- 8 unchanged lines hidden (view full) ---

33# http://search.cpan.org/~mjd/Text-Template-1.46/lib/Text/Template.pm#Automatic_postprocessing_of_template_hunks
34
35package OpenSSL::Template;
36
37# Because we know that Text::Template isn't a core Perl module, we use
38# a fallback in case it's not installed on the system
39use File::Basename;
40use File::Spec::Functions;
42use lib "$FindBin::Bin/perl";
43use with_fallback "Text::Template 1.46";
41use lib catdir(dirname(__FILE__));
42use with_fallback qw(Text::Template);
44
45#use parent qw/Text::Template/;
46use vars qw/@ISA/;
47push @ISA, qw/Text::Template/;
48
49# Override constructor
50sub new {
51 my ($class) = shift;

--- 119 unchanged lines hidden (view full) ---

171 $x } @ARGV)
172 : join("", <STDIN>);
173
174# Engage! ############################################################
175
176# Load the full template (combination of files) into Text::Template
177# and fill it up with our data. Output goes directly to STDOUT
178
43
44#use parent qw/Text::Template/;
45use vars qw/@ISA/;
46push @ISA, qw/Text::Template/;
47
48# Override constructor
49sub new {
50 my ($class) = shift;

--- 119 unchanged lines hidden (view full) ---

170 $x } @ARGV)
171 : join("", <STDIN>);
172
173# Engage! ############################################################
174
175# Load the full template (combination of files) into Text::Template
176# and fill it up with our data. Output goes directly to STDOUT
177
179my $template =
180 OpenSSL::Template->new(TYPE => 'STRING',
181 SOURCE => $text,
182 PREPEND => qq{use lib "$FindBin::Bin/perl";});
178my $template = OpenSSL::Template->new(TYPE => 'STRING', SOURCE => $text );
183
184sub output_reset_on {
185 $template->output_reset_on();
186 "";
187}
188sub output_on {
189 $template->output_on();
190 "";

--- 20 unchanged lines hidden ---
179
180sub output_reset_on {
181 $template->output_reset_on();
182 "";
183}
184sub output_on {
185 $template->output_on();
186 "";

--- 20 unchanged lines hidden ---