blib/lib/unix2dos.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 51.7% 15 / 29 CC 5 SCAR 22.2
CC
5
Cov
48%
unix2dos
12.0
dos2unix
12.0
BEGIN
1.0
CRAP 9.2
↑ Summary
1 package unix2dos;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 unix2dos -- Converts DOS files to Unix and vice-versa
9  
10 =head1 VERSION
11  
12 Version 0.02
13  
14 =cut
15  
16 2 our $VERSION = '0.02';
17  
18  
19 =head1 SYNOPSIS
20  
21 use unix2dos ;
22  
23 unix2dos filename(s) ;
24 dos2unix filename(s) ;
25  
26 =head1 EXPORT
27  
28 unix2dos()
29 dos2unix()
30  
31 =cut
32  
33 2 require Exporter ;
34  
35 2 our @ISA = "Exporter" ;
36 2 our @EXPORT = ( "unix2dos" , "dos2unix" ) ;
37  
38 =head1 SUBROUTINES/METHODS
39  
40 =head2 unix2dos
41  
42 unix2dos filename(s)
43  
44 =cut
45  
46 sub unix2dos
47 0 ▶ {
Subroutine unix2dos: not called CC=3 SCAR=24.8
Pod documented
48  
49 0 local ( $^I , @ARGV ) = ( defined , @_ ) ;
50  
51 0 ▶ s/\n/\r\n/ && print while <>
Branch: 2 branches
BranchTrueFalseTotal
defined($_ = readline ARGV) and do { s/\n/\r\n/ and print $_ } 0 0 0
s/\n/\r\n/ and print $_ 0 0 0
52 }
53  
54 =head2 dos2unix
55  
56 dos2unix filename(s)
57  
58 =cut
59  
60 sub dos2unix
61 0 ▶ {
Subroutine dos2unix: not called CC=3 SCAR=24.8
Pod documented
62  
63 0 local ( $^I , @ARGV ) = ( defined , @_ ) ;
64  
65 0 ▶ s/\r\n/\n/ && print while <>
Branch: 2 branches
BranchTrueFalseTotal
defined($_ = readline ARGV) and do { s/\r\n/\n/ and print $_ } 0 0 0
s/\r\n/\n/ and print $_ 0 0 0
66  
67 }
68  
69 =head1 AUTHOR
70  
71 Michael Fuersich, C<< <michael.fuersich at arcor.de> >>
72  
73 =head1 BUGS
74  
75 Please report any bugs or feature requests to C<michael.fuersich@arcor.de>
76  
77 =head1 SUPPORT
78  
79 You can find documentation for this module with the perldoc command.
80  
81 perldoc unix2dos
82  
83 =head1 LICENSE AND COPYRIGHT
84  
85 Copyright 2012 Michael Fuersich.
86  
87 This program is free software; you can redistribute it and/or modify it
88 under the terms of either: the GNU General Public License as published
89 by the Free Software Foundation; or the Artistic License.
90  
91 See http://dev.perl.org/licenses/ for more information.
92  
93  
94 =cut
95  
96 2 1; # End of unix2dos
↑ Summary