- Added RENDERER option to new()
- Deprecated BIG_FILE
- Added pod.t and pod_coverage.t
+ - Tests now run under 5.005_02 without warnings
0.20 Wed Jan 26 12:00:00 2005
- Removed PM_FILTER by adding an optional USE_UNICODE runtime parameter.
=head1 CONTRIBUTORS
-There is a mailing list at http://groups.google.com/group/ExcelTemplate
+There is a mailing list at http://groups.google.com/group/ExcelTemplate or exceltemplate@googlegroups.com
-Robert Graff -
+=head2 Robert Graff
=over 4
=back
+=head1 TEST COVERAGE
+
+I used Devel::Cover to test the coverage of my tests. Every release, I intend to improve these numbers.
+
+Excel::Template is also part of the CPAN Kwalitee initiative, being one of the top 100 non-core modules downloaded from CPAN. If you wish to help out, please feel free to contribute tests, patches, and/or suggestions.
+
+---------------------------- ------ ------ ------ ------ ------ ------ ------
+File stmt branch cond sub pod time total
+---------------------------- ------ ------ ------ ------ ------ ------ ------
+blib/lib/Excel/Template.pm 90.0 57.1 50.0 90.5 100.0 26.0 80.8
+...ib/Excel/Template/Base.pm 83.3 50.0 66.7 75.0 88.9 8.8 80.0
+...cel/Template/Container.pm 46.3 20.0 33.3 58.3 85.7 4.6 47.7
+...emplate/Container/Bold.pm 100.0 n/a n/a 100.0 0.0 0.6 95.0
+.../Container/Conditional.pm 58.5 52.3 66.7 75.0 66.7 0.7 58.4
+...plate/Container/Format.pm 100.0 n/a n/a 100.0 0.0 0.8 96.6
+...plate/Container/Hidden.pm 100.0 n/a n/a 100.0 0.0 0.2 95.0
+...plate/Container/Italic.pm 100.0 n/a n/a 100.0 0.0 0.2 95.0
+...plate/Container/Locked.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
+...emplate/Container/Loop.pm 55.6 40.0 50.0 77.8 75.0 0.5 56.6
+...late/Container/Outline.pm 71.4 n/a n/a 80.0 0.0 0.0 70.0
+...Template/Container/Row.pm 100.0 75.0 n/a 100.0 50.0 0.3 93.8
+...mplate/Container/Scope.pm 100.0 n/a n/a 100.0 n/a 0.1 100.0
+...plate/Container/Shadow.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
+...te/Container/Strikeout.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
+...ate/Container/Workbook.pm 100.0 n/a n/a 100.0 n/a 1.1 100.0
+...te/Container/Worksheet.pm 94.1 50.0 n/a 100.0 0.0 0.9 88.0
+...Excel/Template/Context.pm 83.1 53.4 54.2 95.0 92.9 19.2 75.2
+...Excel/Template/Element.pm 100.0 n/a n/a 100.0 n/a 0.5 100.0
+...mplate/Element/Backref.pm 100.0 50.0 33.3 100.0 0.0 0.1 87.1
+.../Template/Element/Cell.pm 95.8 65.0 80.0 100.0 66.7 3.6 86.9
+...mplate/Element/Formula.pm 100.0 n/a n/a 100.0 0.0 0.3 94.1
+...Template/Element/Range.pm 100.0 66.7 n/a 100.0 66.7 0.2 93.3
+...l/Template/Element/Var.pm 100.0 n/a n/a 100.0 0.0 0.2 94.1
+...Excel/Template/Factory.pm 57.1 34.6 n/a 88.9 100.0 15.4 55.2
+.../Excel/Template/Format.pm 98.3 81.2 33.3 100.0 100.0 9.9 93.2
+...xcel/Template/Iterator.pm 85.2 70.6 70.6 84.6 87.5 2.0 80.4
+...el/Template/TextObject.pm 92.9 62.5 33.3 100.0 50.0 3.6 83.0
+Total 83.0 55.6 57.0 91.1 98.7 100.0 78.6
+---------------------------- ------ ------ ------ ------ ------ ------ ------
+
=head1 COPYRIGHT
This program is free software; you can redistribute
{
my $class = shift;
- push @_, %{shift @_} while UNIVERSAL::isa($_[0], 'HASH');
+ push @_, %{shift @_} while defined $_[0] && UNIVERSAL::isa($_[0], 'HASH');
(@_ % 2)
and die "$class->new() called with odd number of option parameters\n";
=head1 METHODS
-None
+=head2 calculate
+
+This is a wrapper around Excel::Template::Context->get()
+
+=head2 isa
+
+This is a wrapper around Excel::Template::Factory->isa()
+
+=head2 is_embedded
+
+This is a wrapper around Excel::Template::Factory->is_embedded()
=head1 AUTHOR
my $class = shift;
my $self = $class->SUPER::new(@_);
- $self->{ELEMENTS} = [] unless UNIVERSAL::isa($self->{ELEMENTS}, 'ARRAY');
+ $self->{ELEMENTS} = []
+ unless exists $self->{ELEMENTS} &&
+ UNIVERSAL::isa($self->{ELEMENTS}, 'ARRAY');
return $self;
}
$self->{ACTIVE_FORMAT} = Excel::Template::Format->blank_format($self);
$self->{WORKSHEET_NAMES} = undef;
- UNIVERSAL::isa($self->{$_}, 'ARRAY') || ($self->{$_} = [])
- for qw( STACK PARAM_MAP NAME_MAP );
+ for (qw( STACK PARAM_MAP NAME_MAP ))
+ {
+ next if defined $self->{$_} && UNIVERSAL::isa($self->{$_}, 'ARRAY');
+ $self->{$_} = [];
+ }
$self->{$_} = 0 for keys %isAbsolute;
=head1 PURPOSE
+This is a helper node that provides the global context for the nodes do their processing within. It provides attribute scoping, parameter resolution, and other very nice things.
+
+Documentation is provided for if you wish to subclass another node.
+
=head1 NODE NAME
+None
+
=head1 INHERITANCE
+None
+
=head1 ATTRIBUTES
+None
+
=head1 CHILDREN
+None
+
=head1 AFFECTS
+Everything
+
=head1 DEPENDENCIES
-=head1 USAGE
+None
+
+=head1 METHODS
+
+=head2 active_format
+
+=head2 active_worksheet
+
+=head2 add_reference
+
+=head2 get
+
+=head2 get_all_references
+
+=head2 get_last_reference
+
+=head2 named_param
+
+=head2 new_worksheet
+
+=head2 param
+
+=head2 use_unicode
=head1 AUTHOR
my $class = shift;
my $self = $class->SUPER::new(@_);
- $self->{STACK} = [] unless UNIVERSAL::isa($self->{STACK}, 'ARRAY');
+ $self->{STACK} = []
+ unless defined $self->{STACK} &&
+ UNIVERSAL::isa($self->{STACK}, 'ARRAY');
return $self;
}
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use lib 't';
use mock;
-mock->reset;
+mock::reset;
my $CLASS = 'Excel::Template';
use_ok( $CLASS );
ok( $object->write_file( 'filename' ), 'Something returned' );
-my @calls = mock->get_calls;
+my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::add_format( '' )
use_ok( $CLASS );
{
- mock->reset;
+ mock::reset;
my $object = $CLASS->new(
renderer => 'big',
filename => 't/016.xml',
ok( $object->write_file( 'filename' ), 'Something returned' );
- my @calls = mock->get_calls;
+ my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::Big::new( 'filename' )
Spreadsheet::WriteExcel::Big::add_format( '' )
}
{
- mock->reset;
+ mock::reset;
my $object = $CLASS->new(
renderer => Excel::Template->RENDER_XML,
filename => 't/016.xml',
ok( $object->write_file( 'filename' ), 'Something returned' );
- my @calls = mock->get_calls;
+ my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcelXML::new( 'filename' )
Spreadsheet::WriteExcelXML::close( '' )
}
{
- mock->reset;
+ mock::reset;
my $object = $CLASS->new(
renderer => Excel::Template->RENDER_NML,
filename => 't/016.xml',
ok( $object->write_file( 'filename' ), 'Something returned' );
- my @calls = mock->get_calls;
+ my @calls = mock::get_calls;
is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
Spreadsheet::WriteExcel::new( 'filename' )
Spreadsheet::WriteExcel::close( '' )