Philippe Bruhat (BooK) > App-Wallflower > Wallflower::Util

Download:
App-Wallflower-1.004.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.004   Source  

NAME ^

Wallflower::Util - Utility functions for Wallflower

VERSION ^

version 1.004

SYNOPSIS ^

    use Wallflower;
    use Wallflower::Util qw( links_from );

    # use Wallflower to get a response array
    my $wf = Wallflower->new( application => $app, destination => $dir );
    my $response = $wf->get($url);

    # obtain links to resources linked from the document
    my @links = links_from( $response, $url );

DESCRIPTION ^

This module provides methods to extract links from the files produced by Wallflower's get() method.

FUNCTIONS ^

links_from( $response, $url )

Returns all links found in the response body, depending on its content type.

$response is the array reference returned by Wallflower's get() method. $url is the base URL for resolving relative links, i.e. the original argument to get().

AUTHOR ^

Philippe Bruhat (BooK) <book@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Philippe Bruhat (BooK).

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: