Skip to content

Commit

Permalink
Added initargs user/pass for compat with NT 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
semifor committed Jun 15, 2009
1 parent 25b811c commit 47f07e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,3 +1,5 @@
- Added init_args user/pass for compat with NT 2.12

3.01000 2009-06-07
- Added support for the saved_search API methods.

Expand Down
1 change: 1 addition & 0 deletions Makefile.PL
Expand Up @@ -22,6 +22,7 @@ requires 'URI::Escape';
requires 'namespace::autoclean';
requires 'Net::OAuth::Simple';
requires 'LWP::UserAgent' => 2.032;
requires 'MooseX::MultiInitArg';
recommends 'JSON::XS';

no_index directory => 'src';
Expand Down
8 changes: 6 additions & 2 deletions lib/Net/Twitter/Core.pm
@@ -1,6 +1,7 @@
package Net::Twitter::Core;
use 5.008001;
use Moose;
use MooseX::MultiInitArg;
use Carp;
use JSON::Any qw/XS DWIW JSON/;
use URI::Escape;
Expand Down Expand Up @@ -28,8 +29,11 @@ sub isa {

has useragent_class => ( isa => 'Str', is => 'ro', default => 'LWP::UserAgent' );
has useragent_args => ( isa => 'HashRef', is => 'ro', default => sub { {} } );
has username => ( isa => 'Str', is => 'rw', predicate => 'has_username' );
has password => ( isa => 'Str', is => 'rw' );
has username => ( traits => [qw/MooseX::MultiInitArg::Trait/],
isa => 'Str', is => 'rw', predicate => 'has_username',
init_args => [qw/user/] );
has password => ( traits => [qw/MooseX::MultiInitArg::Trait/],
isa => 'Str', is => 'rw', init_args => [qw/pass/] );
has useragent => ( isa => 'Str', is => 'ro', default => "Net::Twitter/$VERSION (Perl)" );
has source => ( isa => 'Str', is => 'ro', default => 'twitterpm' );
has ua => ( isa => 'Object', is => 'rw' );
Expand Down

0 comments on commit 47f07e2

Please sign in to comment.