line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::PTD::BzDmp; |
2
|
|
|
|
|
|
|
$Lingua::PTD::BzDmp::VERSION = '1.14'; |
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
11
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent 'Lingua::PTD'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
876
|
use IO::Compress::Bzip2 2.066 qw(bzip2 $Bzip2Error); |
|
1
|
|
|
|
|
36161
|
|
|
1
|
|
|
|
|
112
|
|
9
|
1
|
|
|
1
|
|
1009
|
use IO::Uncompress::Bunzip2 2.066 qw(bunzip2 $Bunzip2Error); |
|
1
|
|
|
|
|
12344
|
|
|
1
|
|
|
|
|
160
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=encoding UTF-8 |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Lingua::PTD::BzDmp - Sub-module to handle PTD bzipped files in Dumper Format |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use Lingua::PTD; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$ptd = Lingua::PTD->new( "file.dmp.bz2" ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Check L<> for complete reference. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SEE ALSO |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
NATools(3), perl(1) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 AUTHOR |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Alberto Manuel Brandão Simões, Eambs@cpan.orgE |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Copyright (C) 2011-2014 by Alberto Manuel Brandão Simões |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub new { |
42
|
0
|
|
|
0
|
1
|
|
my ($class, $filename) = @_; |
43
|
0
|
|
|
|
|
|
my $self; |
44
|
0
|
0
|
|
|
|
|
bunzip2 $filename => \$self or die "Failed to bunzip: $Bunzip2Error."; |
45
|
|
|
|
|
|
|
{ |
46
|
1
|
|
|
1
|
|
7
|
no strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
142
|
|
|
0
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
$self = eval $self; |
48
|
0
|
0
|
|
|
|
|
die $@ if $@; |
49
|
|
|
|
|
|
|
} |
50
|
0
|
|
|
|
|
|
bless $self => $class #amen |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub _save { |
54
|
0
|
|
|
0
|
|
|
my ($self, $filename) = @_; |
55
|
|
|
|
|
|
|
|
56
|
0
|
0
|
|
|
|
|
my $z = new IO::Compress::Bzip2 $filename, encode => 'utf8' or return 0; |
57
|
0
|
|
|
|
|
|
binmode $z, ":utf8"; |
58
|
0
|
|
|
|
|
|
select $z; |
59
|
0
|
|
|
|
|
|
$self->dump; |
60
|
0
|
|
|
|
|
|
$z->close; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return 1; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
"This isn't right. This isn't even wrong."; |
66
|
|
|
|
|
|
|
__END__ |