1 package CPANPLUS::Module::Author::Fake;
4 use CPANPLUS::Module::Author;
5 use CPANPLUS::Internals;
10 use Params::Check qw[check];
12 @ISA = qw[CPANPLUS::Module::Author];
14 $Params::Check::VERBOSE = 1;
20 CPANPLUS::Module::Author::Fake
24 my $auth = CPANPLUS::Module::Author::Fake->new(
26 email => 'luser@foo.com',
33 A class for creating fake author objects, for shortcut use internally
36 Inherits from C<CPANPLUS::Module::Author>.
40 =head2 new( _id => DIGIT )
42 Creates a dummy author object. It can take the same options as
43 C<< CPANPLUS::Module::Author->new >>, but will fill in default ones
44 if none are provided. Only the _id key is required.
53 author => { default => 'CPANPLUS Internals' },
54 email => { default => 'cpanplus-info@lists.sf.net' },
55 cpanid => { default => 'CPANPLUS' },
56 _id => { default => CPANPLUS::Internals->_last_id },
59 my $args = check( $tmpl, \%hash ) or return;
61 my $obj = CPANPLUS::Module::Author->new( %$args ) or return;
64 error(loc("No '%1' specified -- No CPANPLUS object associated!",'_id'));
68 ### rebless object ###
69 return bless $obj, $class;
76 # c-indentation-style: bsd
78 # indent-tabs-mode: nil
80 # vim: expandtab shiftwidth=4: