/usr/share/perl5/Padre/Template.pm is in padre 1.00+dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | package Padre::Template;
use 5.008;
use strict;
use warnings;
use File::Spec ();
use Padre::Util ();
use Padre::Constant ();
use Padre::Current ();
our $VERSION = '1.00';
use constant TEMPLATE_DIRECTORY => Padre::Util::sharedir('templates');
######################################################################
# Main Methods
sub render {
my $class = shift;
my $path = shift;
my $name = $path;
# Resolve the full path if it is a core template
unless ( File::Spec->file_name_is_absolute($path) ) {
my $full = File::Spec->catfile( TEMPLATE_DIRECTORY, $path );
unless ( -f $full ) {
die "The core template '$path' does not exist";
}
$path = $full;
}
# Load the template file
my $input = Padre::Util::slurp($path);
unless ($input) {
die "Failed to load template file '$name'";
}
# Hand off to Template::Tiny
require Template::Tiny;
my $output = '';
Template::Tiny->new->process( $input, { @_ }, \$output );
return $output;
}
1;
# Copyright 2008-2013 The Padre development team as listed in Padre.pm.
# LICENSE
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl 5 itself.
|