NAME
Attribute::Attempts - attribute version of Attempt::Sub
SYNOPSIS
use Attribute::Attempts;
# alter db will try three times before failing
sub alter_db : attempts(tries => 3, delay => 2)
{
my $dbh = DBI->connect("DBD::Mysql:foo", "mark", "opensaysme")
or die "Can't connect to database";
$dbh->{RaiseException} = 1;
$dbh->do("alter table items change pie pies int(10)");
}
DESCRIPTION
It's an attribute version of Sub::Attempts. See Sub::Attempts for information on how the attributes work.
AUTHOR
Written by Mark Fowler <mark@twoshortplanks.com>
Copryright Mark Fowler 2003. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
BUGS
As far as I know, works on any platform Attribute::Handlers does.
Bugs should be reported to me via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Attribute::Attempts.