| 1 | package Spreadsheet::WriteExcel::Simple::Save; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use FileHandle; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use Spreadsheet::WriteExcel::Simple; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use Carp qw(croak); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 1 | require Exporter; | |||||||||
| 14 | |||||||||||
| 15 | 1 | our @ISA = qw(Exporter); | |||||||||
| 16 | |||||||||||
| 17 | # Items to export into callers namespace by default. Note: do not export | ||||||||||
| 18 | # names by default without a very good reason. Use EXPORT_OK instead. | ||||||||||
| 19 | # Do not simply export all your public functions/methods/constants. | ||||||||||
| 20 | |||||||||||
| 21 | # This allows declaration use Spreadsheet::WriteExcel::Simple::Save ':all'; | ||||||||||
| 22 | # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK | ||||||||||
| 23 | # will save memory. | ||||||||||
| 24 | 1 | our %EXPORT_TAGS = ( 'all' => [ qw( | |||||||||
| 25 | |||||||||||
| 26 | ) ] ); | ||||||||||
| 27 | |||||||||||
| 28 | 1 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||||||||
| 29 | |||||||||||
| 30 | 1 | our @EXPORT = qw( | |||||||||
| 31 | |||||||||||
| 32 | ); | ||||||||||
| 33 | 1 | our $VERSION = '0.05'; | |||||||||
| 34 | |||||||||||
| 35 | |||||||||||
| 36 | # Preloaded methods go here. | ||||||||||
| 37 | |||||||||||
| 38 | 1 | ▶ | sub Spreadsheet::WriteExcel::Simple::save { | ||||||||
|
Subroutine
save: called CC=3 SCAR=11.3
Pod
documented
| |||||||||||
| 39 | |||||||||||
| 40 | 1 | my $self = shift; | |||||||||
| 41 | 1 | ▶ | my $save_name = shift or croak "must supply save file name"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | |||||||||||
| 43 | 1 | ▶ | my $savef = new FileHandle ">$save_name" or die $!; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | |||||||||||
| 45 | 1 | binmode($savef); | |||||||||
| 46 | |||||||||||
| 47 | 1 | $savef->print($self->data); | |||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | |||||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | 1 | 1; | |||||||||
| 54 | __END__ | ||||||||||