[BACK]Return to OpenAMD.pm CVS log [TXT][DIR] Up to [local] / HOPE / Net-OpenAMD / lib / Net

Diff for /HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm between version 1.14 and 1.15

version 1.14, 2010/06/30 19:45:42 version 1.15, 2010/06/30 20:02:48
Line 1 
Line 1 
 package Net::OpenAMD;  package Net::OpenAMD;
   
 # $AFresh1: OpenAMD.pm,v 1.13 2010/06/30 05:30:17 andrew Exp $  # $AFresh1: OpenAMD.pm,v 1.14 2010/06/30 18:45:42 andrew Exp $
   
 use warnings;  use warnings;
 use strict;  use strict;
Line 20 
Line 20 
 {  {
   
     my @attr_refs      my @attr_refs
         = \( my %base_uri_of, my %ua_of, my %auth_of, my %helpers_of );          = \( my %base_uri_of, my %ua_of, my %auth_of, my %actions_of );
   
     sub new {      sub new {
         my ( $class, $options ) = @_;          my ( $class, $options ) = @_;
Line 33 
Line 33 
   
         $base_uri_of{$ident} = $options->{base_uri} || $BASE_URI;          $base_uri_of{$ident} = $options->{base_uri} || $BASE_URI;
         $ua_of{$ident}       = $options->{ua}       || LWP::UserAgent->new();          $ua_of{$ident}       = $options->{ua}       || LWP::UserAgent->new();
         $helpers_of{$ident}  = $options->{helpers}          $actions_of{$ident}  = $options->{actions}
             || [qw( location speakers talks interests users )];              || [qw( location speakers talks interests users )];
   
         foreach my $helper ( @{ $helpers_of{$ident} } ) {          foreach my $action ( @{ $actions_of{$ident} } ) {
             ## no critic              ## no critic
             no strict 'refs';              no strict 'refs';
             *{$helper} = sub { shift->get( $helper, @_ ) };              *{$action} = sub { shift->get( $action, @_ ) };
         }          }
   
         # XXX Authenticate          # XXX Authenticate
Line 173 
Line 173 
   
 =back  =back
   
 Unless specified, there is nothing different about any of the helper methods  Unless specified, there is nothing different about any of the action methods
 than just calling get($action) instead.  Depending on API changes, this may  than just calling get($action) instead.  Depending on API changes, this may
 not always be the case.  not always be the case.
   

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>