Changeset 21986 for lang/perl/Catalyst-View-Spreadsheet-WriteExcel
- Timestamp:
- 10/23/08 19:38:23 (5 years ago)
- Location:
- lang/perl/Catalyst-View-Spreadsheet-WriteExcel/trunk
- Files:
-
- 2 modified
-
lib/Catalyst/View/Spreadsheet/WriteExcel.pm (modified) (1 diff)
-
t/lib/TestApp.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Catalyst-View-Spreadsheet-WriteExcel/trunk/lib/Catalyst/View/Spreadsheet/WriteExcel.pm
r21985 r21986 44 44 my $x = 0; 45 45 for my $key (@{$c->stash->{header}}) { 46 $sheet->write_utf16be_string($y, $x, utf8($rec->{$key})->utf16be); 46 my $package = ref $rec; 47 my $data = $package->can($key) ? $rec->$key : $rec->{$key}; 48 $sheet->write_utf16be_string($y, $x, utf8($data)->utf16be); 47 49 $x++; 48 50 } -
lang/perl/Catalyst-View-Spreadsheet-WriteExcel/trunk/t/lib/TestApp.pm
r21985 r21986 20 20 my @list = ( 21 21 {name => 'mizuno', score => 10,}, 22 {name => 'aql', score => 130,},23 {name => '$B$R$G$*$-(B', score => 200, },22 TestApp::Data->new({name => 'aql', score => 130,}), 23 TestApp::Data->new({name => '$B$R$G$*$-(B', score => 200, }), 24 24 {name => '$B$N$V$*(B', score => 70, }, 25 25 ); … … 31 31 } 32 32 33 package TestApp::Data; 34 use base qw/Class::Accessor::Fast/; 35 __PACKAGE__->mk_accessors(qw/name score/); 36 33 37 1;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)