SWISH::Prog::DocSWISH::Prog::Doc is a document object for passing to Swish-e indexer. | |
Download |
SWISH::Prog::Doc Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Peter Karman
- Publisher web site:
- http://search.cpan.org/~karman/CatalystX-CRUD-0.17/lib/CatalystX/CRUD/Tutorial.pod
SWISH::Prog::Doc Tags
SWISH::Prog::Doc Description
SWISH::Prog::Doc is a document object for passing to Swish-e indexer. SWISH::Prog::Doc is a document object for passing to Swish-e indexer.SYNOPSIS # subclass SWISH::Prog::Doc # and create _filter() methods package My::Prog::Doc use base qw( SWISH::Prog::Doc ); sub url_filter { my $doc = shift; my $url = $doc->url; $url =~ s/my.foo.com/my.bar.org/; $doc->url( $url ); } sub content_filter { my $doc = shift; my $buf = $doc->content; $buf =~ s/foo/bar/gi; $doc->content( $buf ); } 1;SWISH::Prog::Doc is the base class for Doc objects in the SWISH::Prog framework. Doc objects are created and returned by the SWISH::Prog->fetch() method.You can subclass SWISH::Prog::Doc and add _filter() methods to alter the values of the Doc object before it is returned from fetch().If you subclass SWISH::Prog, you MUST subclass SWISH::Prog::Doc as well, even if only as a placeholder.Example: package MyApp::Prog; use base qw( SWISH::Prog ); sub ok { my $self = shift; my $doc = shift; 1; # everything is permitted (but not all things are profitable...) } 1; package MyApp::Prog::Doc; # must use same base class name as above 1; Requirements: · Perl
SWISH::Prog::Doc Related Software