NAME

Pinto::Role::UserAgent - Something that makes network requests

VERSION

version 0.0994_01

METHODS

mirror(RESOURCE => PATH)

Mirrors the resource located at from to the file located at PATH, if the RESOURCE is newer than the file at PATH. If the intervening directories do not exist, they will be created for you. Returns a true value if the file has changed, returns false if it has not changed. Throws an exception if anything goes wrong.

The RESOURCE can be either a URI or Path::Class::File object, or a string that represents either of those. The PATH can be a Path::Class::File object or a string that represents one.

mirror_temporary(RESOURCE)

Mirrors RESOURCE to a file in a temporary directory. The file will have the same basename as the RESOURCE. Returns a Path::Class::File that points to the new file. Throws and exception if anything goes wrong. Note the temporary directory and all its contents will be deleted when the process terminates.

AUTHOR

Jeffrey Ryan Thalhammer <jeff@stratopan.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Jeffrey Ryan Thalhammer.

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