-
-
21 Aug 2018 04:24:16 UTC
- Distribution: Text-WordDiff
- Module version: 0.09
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (5)
- Testers (742 / 0 / 0)
- Kwalitee
Bus factor: 1- 87.76% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (25.41KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Algorithm::Diff
- HTML::Entities
- Term::ANSIColor
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Name
Text::WordDiff::ANSIColor - ANSI colored formatting for Text::WordDiff
Synopsis
use Text::WordDiff; my $diff = word_diff 'file1.txt', 'file2.txt'; my $diff = word_diff \$string1, \$string2, { STYLE => 'ANSIColor' }; my $diff = word_diff \*FH1, \*FH2; \%options; my $diff = word_diff \&reader1, \&reader2; my $diff = word_diff \@records1, \@records2; # May also mix input types: my $diff = word_diff \@records1, 'file_B.txt';
Description
This class subclasses Text::WordDiff::Base to provide a formatting class for Text::WordDiff that uses ANSI-standard terminal escape sequences to highlight deleted and inserted text. This formatting class is the default class used by Text::WordDiff; see its documentation for details on its interface. This class should never be used directly.
Text::WordDiff::ANSIColor formats word diffs for viewing in an ANSI-standard terminal session. The diff content is highlighted as follows:
- Deletes
-
Deleted words will display in bold-faced red. The ANSI standard for strikethrough is also used, but since it is not supported by most terminals, likely will not show up.
- Inserts
-
Inserted words will display in bold-faced, underlined green.
All other content is simply returned.
See Also
Support
This module is stored in an open repository at the following address:
https://svn.kineticode.com/Text-WordDiff/trunk/
Patches against Text::WordDiff are welcome. Please send bug reports to <bug-text-worddiff@rt.cpan.org>.
Author
David Wheeler <david@kineticode.com>
Currently maintained by the developers of The Perl Shop <tps@cpan.org>.
Copyright and License
Copyright (c) 2005-2011 David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Text::WordDiff, copy and paste the appropriate command in to your terminal.
cpanm Text::WordDiff
perl -MCPAN -e shell install Text::WordDiff
For more information on module installation, please visit the detailed CPAN module installation guide.