| Net-Trac documentation | Contained in the Net-Trac distribution. |
Net::Trac::Mechanize - Provides persistent credentials for the Trac instance
This class subclasses WWW::Mechanize to provide persistent HTTP credentials when accessing a Trac instance.
Returns the credentials that WWW::Mechanize expects.
Copyright 2008-2009 Best Practical Solutions.
This package is licensed under the same terms as Perl 5.8.8.
| Net-Trac documentation | Contained in the Net-Trac distribution. |
use strict; use warnings; package Net::Trac::Mechanize;
use Any::Moose; extends 'WWW::Mechanize';
has trac_user => ( isa => 'Str', is => 'rw' ); has trac_password => ( isa => 'Str', is => 'rw' );
sub get_basic_credentials { my $self = shift; return ( $self->trac_user => $self->trac_password ); }
# This is commented because it breaks the class, causing it to # seemingly not follow HTTP redirects. #__PACKAGE__->meta->make_immutable; no Any::Moose; 1;