Text::Diff::HTML man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Text::Diff::HTML(3)   User Contributed Perl Documentation  Text::Diff::HTML(3)

Name
       Text::Diff::HTML - XHTML format for Text::Diff::Unified

Synopsis
	   use Text::Diff;

	   my $diff = diff "file1.txt", "file2.txt", { STYLE => 'Text::Diff::HTML' };
	   my $diff = diff \$string1,	\$string2,   { STYLE => 'Text::Diff::HTML' };
	   my $diff = diff \*FH1,	\*FH2,	     { STYLE => 'Text::Diff::HTML' };
	   my $diff = diff \&reader1,	\&reader2,   { STYLE => 'Text::Diff::HTML' };
	   my $diff = diff \@records1,	\@records2,  { STYLE => 'Text::Diff::HTML' };
	   my $diff = diff \@records1,	"file.txt",  { STYLE => 'Text::Diff::HTML' };

Description
       This class subclasses Text::Diff::Unified, a formatting class provided
       by the Text::Diff module, to add XHTML markup to the unified diff
       format. For details on the interface of the "diff()" function, see the
       Text::Diff documentation.

       In the XHTML formatted by this module, the contents of the diff
       returned by "diff()" are wrapped in a "<div>" element, as is each hunk
       of the diff.  Within each hunk, all content is properly HTML encoded
       using HTML::Entities, and the various sections of the diff are marked
       up with the appropriate XHTML elements. The elements used are as
       follows:

       ·   "<div class="file">"

	   This element contains the entire contents of the diff "file"
	   returned by "diff()". All of the following elements are subsumed by
	   this one.

	   ·   "<span class="fileheader">"

	       The header section for the files being "diff"ed, usually
	       something like:

		 --- in.txt    Thu Sep	1 12:51:03 2005
		 +++ out.txt   Thu Sep	1 12:52:12 2005

	       This element immediately follows the opening "file" "<div>"
	       element.

	   ·   "<div class="hunk">"

	       This element contains a single diff "hunk". Each hunk may
	       contain the following elements:

	       ·   "<span class="hunkheader">"

		   Header for a diff hunk. The hunk header is usually
		   something like:

		     @@ -1,5 +1,7 @@

		   This element immediately follows the opening "hunk" "<div>"
		   element.

	       ·   "<span class="ctx">"

		   Context around the important part of a "diff" hunk. These
		   are contents that have not changed between the files being
		   "diff"ed.

	       ·   "<ins>"

		   Inserted content, each line starting with "+".

	       ·   "<del>"

		   Deleted content, each line starting with "-".

	       ·   "<span class="hunkfooter">"

		   The footer section of a hunk; contains no contents.

	   ·   "<span class="filefooter">"

	       The footer section of a file; contains no contents.

       You may do whatever you like with these elements and classes; I highly
       recommend that you style them using CSS. You'll find an example CSS
       file in the eg directory in the Text-Diff-HTML distribution. You will
       also likely want to wrap the output of your diff in its own element (a
       "<div>" will do) styled with "white-space: pre".

See Also
       Text::Diff
       Algorithm::Diff

Support
       This module is stored in an open repository at the following address:

       https://svn.kineticode.com/Text-Diff-HTML/trunk/
       <https://svn.kineticode.com/Text-Diff-HTML/trunk/>

       Patches against Text::Diff::HTML are welcome. Please send bug reports
       to <bug-text-diff-html@rt.cpan.org>.

Author
       David Wheeler <david@kineticode.com>

Copyright and License
       Copyright (c) 2005-2009 Kineticode, Inc. Some Rights Reserved.

       This module is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.14.1			  2011-06-20		   Text::Diff::HTML(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net