Added filehandles to be parseable
[p5sagit/Excel-Template.git] / t / Spreadsheet / WriteExcel.pm
CommitLineData
b6bc5a5d 1package Spreadsheet::WriteExcel;
2
3use strict;
4
5use mock;
6use Spreadsheet::WriteExcel::Worksheet;
7
8sub new {
9 my $self = bless {
10 }, shift;
11
12 {
13 local $" = "', '";
9d172425 14 push @mock::calls, ref($self) . "::new( '@_' )";
b6bc5a5d 15 }
16
17 return $self;
18}
19
20sub close {
9d172425 21 my $self = shift;
b6bc5a5d 22 {
23 local $" = "', '";
9d172425 24 push @mock::calls, ref($self) . "::close( '@_' )";
b6bc5a5d 25 }
26}
27
28sub add_worksheet {
9d172425 29 my $self = shift;
b6bc5a5d 30 {
31 local $" = "', '";
9d172425 32 push @mock::calls, ref($self) . "::add_worksheet( '@_' )";
b6bc5a5d 33 }
34 return Spreadsheet::WriteExcel::Worksheet->new;
35}
36
37my $format_num = 1;
38sub add_format {
9d172425 39 my $self = shift;
b6bc5a5d 40 my %x = @_;
41 my @x = map { $_ => $x{$_} } sort keys %x;
42 {
43 local $" = "', '";
9d172425 44 push @mock::calls, ref($self) . "::add_format( '@x' )";
b6bc5a5d 45 }
46 return $format_num++;
47}
48
491;
50__END__