blib/lib/App/Asciio/setup/import_export/ascii.pl untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.8
CC
2
Cov
0%
export_ascii
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1  
2 use File::Slurp ;
3  
4 register_import_export_handlers
5 (
6 txt =>
7 {
8 IMPORT => undef ,
9 EXPORT => \&export_ascii,
10 },
11 ) ;
12  
13 use File::Slurp ;
14  
15 sub export_ascii
16 {
17 my ($self, $elements_to_save, $file) = @_ ;
18  
19 if($self->{CREATE_BACKUP} && -e $file)
20 {
21 use File::Copy;
22 copy($file,"$file.bak") or die "export_pod: Copy failed while making backup copy: $!";
23 }
24  
25 my $saved = write_file($file, {binmode => ':utf8'}, $self->transform_elements_to_ascii_buffer()) ;
26  
27 return $saved ;
28 }
29