NAME
Mason::Plugin::SliceFilter - Only output slices of your content optionally.
VERSION
Version 0.01
SYNOPSIS
See Mason 'plugins'. Once this plugin included, you can use the following filter:
CATALYST USERS
If you use Mason with Catalyst, it's very likely your mason interpreter is run within the context of your stash. So for this plugin to work, you need to transfer the slice http parameter to the stash (in your MyApp::WWW::Controller::Root::auto for instance):
$c->stash()->{slice} = $c->req->param('slice');
FILTER
- Slice
-
Outputs its content untouched in case there's no 'slice' parameter in the request.
If there is a slice parameter in the request, output JUST this content if the requested slice matches, ready to be embedded in your page in ajax for instance.
% $.Slice( slice_id => 'myslice' ){{ <p>This bit will be output just on its own if you call this page with ?slice=myslice. </p> % }} % $.Slice( slice_id => 'myslice' , slice_param => 'myparam' ){{ <p>Same thing but with controlable slice param.</p> % }}
AUTHOR
Jerome Eteve, <jerome.eteve at gmail.com>
BUGS
Please report any bugs or feature requests to bug-mason-plugin-slicefilter at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mason-Plugin-SliceFilter. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Mason::Plugin::SliceFilter
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-SliceFilter
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2013 Jerome Eteve.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.