Template-Plugin-Chump README


Template-Plugin-Chump documentation  | view source Contained in the Template-Plugin-Chump distribution.

Index


NAME

Top

Template::Plugin::Chump - provides a Template Toolkit filter for Chump like syntax

SYNOPSIS

Top

	[% USE Chump %]

	<html>
	<body>

	[% FILTER chump %]

	This will get turned into a clickable link
	http://something.com 

	This will turn the word 'foo' into a link to bar.com
	[foo|http://bar.com]

	This will get turned into an image link 
    +[http://foo.com/quux.jpg]

	This will get turned into an inline image with the label 'bar'
	+[bar|http://foo.com/quux.jpg]

    This will get turned into an image with the label 'bar' which 
    is a link to http://foobar.com
    +[bar|http://foobar.com|http://url.of.image.com/image.jpg]




	[% END %]

	And this will do what you expect
	[% somevar FILTER chump %]

	[% Chump.new_type('equal','=', subref,'rege+xp') %]
	[% FILTER chump %]
	=[foo|regeeeeexp]
	[% END %]
	the subroutine subref will now be called for all links 
    of the format =[<stuff>]

	[% FILTER chump( {links=>0}) %]
	links won't be parsed so this ...
	[foo|http://bar.com]
	will remain as is
	[% END %]	

	</body>
	</html>

Alternatively you can pass in a Text::Chump object and use that.



	[% USE Chump({ chump => my_chump_object }) %]







DEPENDENCIES

Top

This module has external dependencies on the following modules:

 Template
 Test::More
 Text::Chump     

INSTALLATION

Top

 perl Makefile.PL
 make test

and if all goes well

 make install

HISTORY

Top

Revision history for Perl extension Template::Plugin::Chump.

2003-10-07 Some minor fixing To fix a minor snafu with Template::Plugin::ShellQuote

2003-06-25 More docs, a new option

AUTHOR

Top

Simon Wistow <simon@thegestalt.org>

SEE ALSO

Top

Text::Chump, Template::Plugin::Filter


Template-Plugin-Chump documentation  | view source Contained in the Template-Plugin-Chump distribution.