use Excel::Template::Base;
use vars qw ($VERSION @ISA);
- $VERSION = '0.26';
+ $VERSION = '0.27';
@ISA = qw( Excel::Template::Base );
}
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
- blib/lib/Excel/Template.pm 93.8 60.0 58.8 100.0 100.0 24.6 83.3
- ...ib/Excel/Template/Base.pm 94.4 50.0 n/a 100.0 0.0 7.0 80.0
- ...cel/Template/Container.pm 100.0 50.0 33.3 100.0 0.0 4.1 83.3
- ...emplate/Container/Bold.pm 100.0 n/a n/a 100.0 0.0 0.3 95.0
- .../Container/Conditional.pm 95.9 90.0 66.7 100.0 0.0 1.2 91.0
- ...plate/Container/Format.pm 100.0 n/a n/a 100.0 0.0 0.5 96.6
- ...plate/Container/Hidden.pm 100.0 n/a n/a 100.0 0.0 0.0 95.0
+ blib/lib/Excel/Template.pm 93.8 60.0 58.8 100.0 100.0 15.8 83.3
+ ...ib/Excel/Template/Base.pm 94.4 50.0 n/a 100.0 0.0 6.7 80.0
+ ...cel/Template/Container.pm 100.0 50.0 33.3 100.0 0.0 5.7 83.3
+ ...emplate/Container/Bold.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
+ .../Container/Conditional.pm 95.9 90.0 66.7 100.0 0.0 2.0 91.0
+ ...plate/Container/Format.pm 100.0 n/a n/a 100.0 0.0 0.8 96.8
+ ...plate/Container/Hidden.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
...plate/Container/Italic.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
...ainer/KeepLeadingZeros.pm 100.0 100.0 n/a 100.0 0.0 0.1 96.3
...plate/Container/Locked.pm 100.0 n/a n/a 100.0 0.0 0.0 95.0
- ...emplate/Container/Loop.pm 96.8 50.0 50.0 100.0 0.0 0.3 82.7
- ...late/Container/Outline.pm 100.0 n/a n/a 100.0 0.0 0.0 95.0
- ...Template/Container/Row.pm 100.0 75.0 n/a 100.0 0.0 0.2 90.6
+ ...emplate/Container/Loop.pm 96.8 50.0 50.0 100.0 0.0 0.5 82.7
+ ...late/Container/Outline.pm 100.0 n/a n/a 100.0 0.0 0.1 95.0
+ ...Template/Container/Row.pm 100.0 75.0 n/a 100.0 0.0 0.3 90.6
...mplate/Container/Scope.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0
...plate/Container/Shadow.pm 100.0 n/a n/a 100.0 0.0 0.0 95.0
...te/Container/Strikeout.pm 100.0 n/a n/a 100.0 0.0 0.0 95.0
- ...ate/Container/Workbook.pm 100.0 n/a n/a 100.0 n/a 2.6 100.0
- ...te/Container/Worksheet.pm 94.7 75.0 n/a 100.0 0.0 1.0 87.1
- ...Excel/Template/Context.pm 98.0 80.0 75.0 100.0 73.3 21.4 90.7
- ...Excel/Template/Element.pm 100.0 n/a n/a 100.0 n/a 0.3 100.0
- ...mplate/Element/Backref.pm 100.0 50.0 33.3 100.0 0.0 0.4 87.1
- .../Template/Element/Cell.pm 97.9 75.0 80.0 100.0 0.0 3.5 88.6
- ...mplate/Element/Formula.pm 100.0 n/a n/a 100.0 0.0 0.2 94.1
+ ...ate/Container/Workbook.pm 100.0 n/a n/a 100.0 n/a 0.6 100.0
+ ...te/Container/Worksheet.pm 94.7 75.0 n/a 100.0 0.0 0.9 87.1
+ ...Excel/Template/Context.pm 98.0 80.0 75.0 100.0 73.3 31.4 90.7
+ ...Excel/Template/Element.pm 100.0 n/a n/a 100.0 n/a 0.4 100.0
+ ...mplate/Element/Backref.pm 100.0 50.0 33.3 100.0 0.0 0.1 87.1
+ .../Template/Element/Cell.pm 97.9 75.0 80.0 100.0 0.0 3.9 88.6
+ ...mplate/Element/Formula.pm 100.0 n/a n/a 100.0 0.0 0.1 94.1
...te/Element/FreezePanes.pm 100.0 n/a n/a 100.0 0.0 0.0 95.5
...Template/Element/Image.pm 100.0 100.0 n/a 100.0 0.0 0.1 94.3
...Template/Element/Range.pm 100.0 66.7 n/a 100.0 0.0 0.1 88.9
...l/Template/Element/Var.pm 100.0 n/a n/a 100.0 0.0 0.0 94.1
- ...Excel/Template/Factory.pm 100.0 73.1 66.7 100.0 100.0 23.5 91.4
- .../Excel/Template/Format.pm 98.4 75.0 33.3 100.0 66.7 5.4 90.5
- ...xcel/Template/Iterator.pm 98.6 80.0 70.6 100.0 50.0 1.1 88.8
- ...el/Template/TextObject.pm 92.9 62.5 33.3 100.0 0.0 1.8 80.9
+ ...Excel/Template/Factory.pm 100.0 73.1 66.7 100.0 100.0 16.3 91.4
+ .../Excel/Template/Format.pm 98.4 75.0 33.3 100.0 66.7 9.1 90.5
+ ...xcel/Template/Iterator.pm 98.6 80.0 70.6 100.0 50.0 2.0 88.8
+ ...el/Template/TextObject.pm 92.9 62.5 33.3 100.0 0.0 2.8 80.9
Total 97.8 74.3 63.5 100.0 35.7 100.0 89.4
---------------------------- ------ ------ ------ ------ ------ ------ ------
--- /dev/null
+BEGIN{ $^W = 0 }
+use strict;
+
+use Test::More tests => 5;
+
+use lib 't';
+use mock;
+mock::reset;
+
+my $CLASS = 'Excel::Template';
+use_ok( $CLASS );
+
+my $object = $CLASS->new(
+ filename => 't/026_vars_in_format.xml',
+);
+isa_ok( $object, $CLASS );
+
+ok(
+ $object->param(
+ loopy => [
+ { value => 1, color => 'red' },
+ { value => 2, color => 'green' },
+ { value => 3, color => 'yellow' },
+ ],
+ ),
+ 'Parameters set',
+);
+
+ok( $object->write_file( 'filename' ), 'Something returned' );
+
+my @calls = mock::get_calls;
+is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
+Spreadsheet::WriteExcel::new( 'filename' )
+Spreadsheet::WriteExcel::add_format( '' )
+Spreadsheet::WriteExcel::add_worksheet( 'loops' )
+Spreadsheet::WriteExcel::Worksheet::new( '' )
+Spreadsheet::WriteExcel::add_format( 'bg_color', 'red' )
+Spreadsheet::WriteExcel::Worksheet::write( '0', '0', '1', '2' )
+Spreadsheet::WriteExcel::add_format( 'bg_color', 'green' )
+Spreadsheet::WriteExcel::Worksheet::write( '0', '1', '2', '3' )
+Spreadsheet::WriteExcel::add_format( 'bg_color', 'yellow' )
+Spreadsheet::WriteExcel::Worksheet::write( '0', '2', '3', '4' )
+Spreadsheet::WriteExcel::close( '' )
+__END_EXPECTED__