blib/lib/Spreadsheet/WriteExcel/Simple/Save.pm

filter: Statementstmt 100% 30 / 30 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 95.2% 40 / 42 CC 3 SCAR 5.3
CC
3
Cov
94%
save
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
↑ Summary
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
BranchTrueFalseTotal
my $save_name = shift() or croak("must supply save file name") 1 0 1
42  
43 1 ▶ my $savef = new FileHandle ">$save_name" or die $!;
Branch: 1 branch
BranchTrueFalseTotal
my $savef = "FileHandle"->new(">$save_name") or die $! 1 0 1
44  
45 1 binmode($savef);
46
47 1 $savef->print($self->data);
48  
49
50  
51 }
52  
53 1 1;
54 __END__
↑ Summary