GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTTP::PROXY::BODYFILTER::LINES (3)

.ds Aq ’

NAME

HTTP::Proxy::BodyFilter::lines - A filter that outputs only complete lines

CONTENTS

SYNOPSIS



    use HTTP::Proxy::BodyFilter::lines;
    use MyFilter;    # this filter only works on complete lines

    my $filter = MyFilter->new();

    # stack both filters so that theyll handle text/* responses
    $proxy->push_filter(
        mime     => text/*,
        response => HTTP::Proxy::BodyFilter::lines->new,
        response => $filter
    );

    # I want my lines to end with !
    # This is equivalent to $/ = ! in a normal Perl program
    my $lines = HTTP::Proxy::BodyFilter::lines->new(!);



DESCRIPTION

The HTTP::Proxy::BodyFilter::lines filter makes sure that the next filter in the filter chain will only receive complete lines. The chunks of data received by the following filters with either end with \n or will be the last piece of data for the current HTTP message body.

You can change the idea the filter has of what is a line by passing to its constructor the string it should understand as line ending. \n is the default value.



    my $filter = HTTP::Proxy::BodyFilter::lines->new( $sep );



This is similar to modifying $/ in a Perl program. In fact, this filter has a behaviour so similar to modifying $/ that it also knows about paragraph mode and record mode.

Note that the slurp mode is not supported. Please use HTTP::Proxy::BodyFilter::complete to enable the generic store and forward filter mechanism.

METHODS

This filter defines the following methods, which are automatically called:
init() Initialise the filter with the EOL information.
filter() Keeps unfinished lines for later.
will_modify() This method returns a false value, thus indicating to the system that it will not modify data passing through.

SEE ALSO

HTTP::Proxy, HTTP::Proxy::BodyFilter.

AUTHOR

Philippe BooK Bruhat, <book@cpan.org>.

COPYRIGHT

Copyright 2003-2015, Philippe Bruhat.

LICENSE

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTTP::PROXY::BODYFILTER::LINES (3) 2015-06-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.