| 1 | package Lingua::PTD::Dumper; | ||||||||||
| 2 | 1 | $Lingua::PTD::Dumper::VERSION = '1.15'; | |||||||||
| 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 parent 'Lingua::PTD'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | =encoding UTF-8 | ||||||||||
| 9 | |||||||||||
| 10 | =head1 NAME | ||||||||||
| 11 | |||||||||||
| 12 | Lingua::PTD::Dumper - Sub-module to handle PTD files in Dumper Format | ||||||||||
| 13 | |||||||||||
| 14 | =head1 SYNOPSIS | ||||||||||
| 15 | |||||||||||
| 16 | use Lingua::PTD; | ||||||||||
| 17 | |||||||||||
| 18 | $ptd = Lingua::PTD->new( "file.dmp" ); | ||||||||||
| 19 | |||||||||||
| 20 | =head1 DESCRIPTION | ||||||||||
| 21 | |||||||||||
| 22 | Check L<<Lingua::PTD>> for complete reference. | ||||||||||
| 23 | |||||||||||
| 24 | =head1 SEE ALSO | ||||||||||
| 25 | |||||||||||
| 26 | NATools(3), perl(1) | ||||||||||
| 27 | |||||||||||
| 28 | =head1 AUTHOR | ||||||||||
| 29 | |||||||||||
| 30 | Alberto Manuel Brandão Simões, E<lt>ambs@cpan.orgE<gt> | ||||||||||
| 31 | |||||||||||
| 32 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 33 | |||||||||||
| 34 | Copyright (C) 2010-2014 by Alberto Manuel Brandão Simões | ||||||||||
| 35 | |||||||||||
| 36 | =cut | ||||||||||
| 37 | |||||||||||
| 38 | sub new { | ||||||||||
| 39 | 0 | ▶ | my ($class, $filename) = @_; | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 40 | 0 | my $self = do $filename; | |||||||||
| 41 | 0 | bless $self => $class #amen | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | sub _save { | ||||||||||
| 45 | 0 | ▶ | my ($self, $filename) = @_; | ||||||||
|
Subroutine
_save: not called CC=2 SCAR=17.9
| |||||||||||
| 46 | |||||||||||
| 47 | 0 | ▶ | open OUT, ">:utf8", $filename or return 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | 0 | select OUT; | |||||||||
| 49 | 0 | $self->dump; | |||||||||
| 50 | 0 | close OUT; | |||||||||
| 51 | |||||||||||
| 52 | 0 | return 1; | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 1 | "This isn't right. This isn't even wrong."; | |||||||||
| 56 | __END__ | ||||||||||