EOL
view release on metacpan or search on metacpan
eol_same_file: A routine to convert line endings and write to the original file (i.e., clobbers the file you send it). The developer may specify that the original be backed-up a *single* time. This routine takes an incoming argument which corresponds...
my ($in) = $ARGV[0] = "original.txt"; # Must prime @ARGV.
eol_same_file(
in => $in,
eol => "CR",
backup => ".bak"
);
=head2 eol_return_array
eol_return_array: A routine to convert line endings and return an array reference of all of the converted line. This routine takes one incoming argument which corresponds to an input file name. By default, all newlines will be converted to standard U...
NOTE: End of line characters are returned as their own fields in the array--that is, they are not tacked on to the proceeding line.
my $aref = eol_return_array(
in => $in,
eol => 'CRLF',
);
=head1 DIAGNOSTICS
A user may encounter error messages associated with this module if required method arguments are malformed or missing.
=over
=item C<< EOL reports: not legal arg >>
[An argument was passed that is not legal. See INTERFACE for appropriate arguments per subroutine.]
=item C<< EOL reports: not a text file >>
[A path to a non-plaintext file was passed as input.]
=item C<< EOL reports: cannot open file >>
[There was an error trying to read/or write a file.]
=item C<< EOL reports: not legal EOL tag! Use only: CR; CRLF; LF. >>
[An illegal option was passed to the "eol" option. Legal options are CR; CRLF; LF]
=back
=head1 CONFIGURATION AND ENVIRONMENT
EOL requires no configuration files or environment variables.
=head1 DEPENDENCIES
This module calls a few others: strict; warnings; Carp; version.
=head1 INCOMPATIBILITIES
None reported.
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to
C<bug-eol@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.
=head1 AUTHOR
Todd Wylie
C<< <perldev@monkeybytes.org> >>
L<< http://www.monkeybytes.org >>
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2005, Todd Wylie C<< <perldev@monkeybytes.org> >>. All rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See perlartistic.
=head1 DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
=head1 NOTE
This software was written using the latest version of GNU Emacs, the
extensible, real-time text editor. Please see
L<http://www.gnu.org/software/emacs> for more information and download
sources.
( run in 4.459 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )