James A. Duncan > OpenFrame-AppKit-3.03 > OpenFrame::AppKit::Segment::DispatchOnURI

Download:
OpenFrame-AppKit-3.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

OpenFrame::AppKit::Segment::DispatchOnURI - pipeline segments that dispatch only on certain uris

SYNOPSIS ^

  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;

DESCRIPTION ^

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.

AUTHOR ^

James A. Duncan <jduncan@fotango.com>

COPYRIGHT ^

Copyright 2002 Fotango Ltd. All Rights Reserved

This code is released under the GNU GPL and Artistic licenses.

syntax highlighting: