NAME

Dezi::Bot::Utils - web crawler utilities

SYNOPSIS

use Dezi::Bot::Utils;
my $path = Dezi::Bot::Utils::file_cache_path( $base, $file );
# $path isa Path::Class::File object

DESCRIPTION

The Dezi::Bot::Utils provides utility functions for Dezi::Bot.

FUNCTIONS

file_cache_path( base, file )

Returns a Path::Class::File object for file under base directory path. Up to two subdirectory levels are created between base and file in order to spread out the file hierarchy, similar to File::Cache pattern.

update_or_insert( dbix_inserthash, args )

Takes same args as DBIx::InsertHash->update() but will make educated guess at whether to insert or update the data.

Returns the row id if insert() was called, otherwise returns hash ref of the updated row.

METHODS

AUTHOR

Peter Karman, <karman at cpan.org>

BUGS

Please report any bugs or feature requests to bug-dezi-bot at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-Bot. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Dezi::Bot

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2013 Peter Karman.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.