/usr/share/perl5/Excel/Template/Container/KeepLeadingZeros.pm is in libexcel-template-perl 0.34-2.
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | package Excel::Template::Container::KeepLeadingZeros;
use strict;
BEGIN {
use vars qw(@ISA);
@ISA = qw(Excel::Template::Container);
use Excel::Template::Container;
}
sub render
{
my $self = shift;
my ($context) = @_;
my $worksheet = $context->active_worksheet;
$worksheet
? $worksheet->keep_leading_zeros( 1 )
: $context->mark( keep_leading_zeros => 1 );
my $rv = $self->SUPER::render($context);
$worksheet
? $worksheet->keep_leading_zeros( 0 )
: $context->mark( keep_leading_zeros => 0 );
return $rv;
}
1;
__END__
=head1 NAME
Excel::Template::Container::KeepLeadingZeros - Excel::Template::Container::KeepLeadingZeros
=head1 PURPOSE
To set the keep_leading_zeros flag for the surrounding worksheet or any worksheets that might be contained within this node.
=head1 NODE NAME
KEEP_LEADING_ZEROS
=head1 INHERITANCE
L<CONTAINER|Excel::Template::Container>
=head1 ATTRIBUTES
None
=head1 CHILDREN
None
=head1 EFFECTS
Alters how leading zeros are interpreted by L<Spreadsheet::WriteExcel>.
=head1 DEPENDENCIES
None
=head1 USAGE
<worksheet>
... Cells here will NOT have leading-zeros preserved
<keep_leading_zeros>
... Cells here will have leading-zeros preserved
</keep_leading_zeros>
... Cells here will NOT have leading-zeros preserved
</worksheet>
<keep_leading_zeros>
<worksheet>
... Cells here will have leading-zeros preserved
</worksheet>
<worksheet>
... Cells here will have leading-zeros preserved
</worksheet>
</keep_leading_zeros>
=head1 AUTHOR
Rob Kinyon (rob.kinyon@gmail.com)
=head1 SEE ALSO
L<CELL|Excel::Template::Element::Cell>, L<Spreadsheet::WriteExcel>
=cut
|