File Coverage

blib/lib/unix2dos.pm
Criterion Covered Total %
statement 6 10 60.0
branch n/a
condition 0 6 0.0
subroutine 2 4 50.0
pod 2 2 100.0
total 10 22 45.4


line stmt bran cond sub pod time code
1             package unix2dos;
2              
3 1     1   41029 use warnings;
  1         3  
  1         36  
4 1     1   6 use strict;
  1         2  
  1         254  
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             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             require Exporter ;
34              
35             our @ISA = "Exporter" ;
36             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             {
48              
49 0     0 1   local ( $^I , @ARGV ) = ( defined , @_ ) ;
50              
51 0   0       s/\n/\r\n/ && print while <>
52             }
53              
54             =head2 dos2unix
55              
56             dos2unix filename(s)
57              
58             =cut
59              
60             sub dos2unix
61             {
62              
63 0     0 1   local ( $^I , @ARGV ) = ( defined , @_ ) ;
64              
65 0   0       s/\r\n/\n/ && print while <>
66              
67             }
68              
69             =head1 AUTHOR
70              
71             Michael Fuersich, C<< >>
72              
73             =head1 BUGS
74              
75             Please report any bugs or feature requests to C
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             1; # End of unix2dos