PTD/Dumper.pm

filter: Statementstmt 60.8% 14 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 1 / 1 totaltotal 59.3% 19 / 32 SCAR 8.5
CC
2
Cov
56%
_save
6.0
new
2.0
BEGIN
1.0
CRAP 2.3
« PTD/BzDmp.pm ↑ Summary PTD/XzDmp.pm »
1 package Lingua::PTD::Dumper;
2 1 $Lingua::PTD::Dumper::VERSION = '1.16';
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Cwd 'abs_path';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use parent 'Lingua::PTD';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 =encoding UTF-8
10  
11 =head1 NAME
12  
13 Lingua::PTD::Dumper - Sub-module to handle PTD files in Dumper Format
14  
15 =head1 SYNOPSIS
16  
17 use Lingua::PTD;
18  
19 $ptd = Lingua::PTD->new( "file.dmp" );
20  
21 =head1 DESCRIPTION
22  
23 Check L<<Lingua::PTD>> for complete reference.
24  
25 =head1 SEE ALSO
26  
27 NATools(3), perl(1)
28  
29 =head1 AUTHOR
30  
31 Alberto Manuel Brandão Simões, E<lt>ambs@cpan.orgE<gt>
32  
33 =head1 COPYRIGHT AND LICENSE
34  
35 Copyright (C) 2010-2014 by Alberto Manuel Brandão Simões
36  
37 =cut
38  
39 sub new {
40 0 ▶ my ($class, $filename) = @_;
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
41
42 0 my $self = do(abs_path($filename));
43 0 bless $self => $class #amen
44 }
45  
46 sub _save {
47 0 ▶ my ($self, $filename) = @_;
Subroutine _save: not called CC=2 SCAR=17.9
48  
49 0 ▶ open OUT, ">:utf8", $filename or return 0;
Branch: 1 branch
BranchTrueFalseTotal
open OUT, ">:utf8", $filename or return 0 0 0 0
50 0 select OUT;
51 0 $self->dump;
52 0 close OUT;
53  
54 0 return 1;
55 }
56  
57 1 "This isn't right. This isn't even wrong.";
58 __END__
« PTD/BzDmp.pm ↑ Summary PTD/XzDmp.pm »