| OpenFrame-AppKit documentation | view source | Contained in the OpenFrame-AppKit distribution. |
OpenFrame::AppKit::Segment::DispatchOnURI - pipeline segments that dispatch only on certain uris
package MyPipeSegment;
use OpenFrame::AppKit::Segment::DispatchOnURI;
use base qw( OpenFrame::AppKit::Segment::DispatchOnURI );
sub uri {
return qr!/some/uri/here.html!
}
sub dispatch_on_uri {
my $self = shift;
my $pipe = shift;
# ...
}
1;
OpenFrame::AppKit::Segment::DispatchOnURI is a base class for all pipeline segments that want to dispatch
only at a certain uri. To subclass it you can simply define the dispatch_on_uri method in your package and
call the uri() method, which by default is a get/set for the regular expression that will match the path of
your uri. If you wish to set a hard value you can override the uri() method to return a regular expression.
James A. Duncan <jduncan@fotango.com>
Copyright 2002 Fotango Ltd. All Rights Reserved
This code is released under the GNU GPL and Artistic licenses.
| OpenFrame-AppKit documentation | view source | Contained in the OpenFrame-AppKit distribution. |