=================================================================== RCS file: /cvs/HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm 2010/06/27 04:11:22 1.7 +++ HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm 2010/06/27 04:23:27 1.8 @@ -1,6 +1,6 @@ package Net::OpenAMD; -# $AFresh1: OpenAMD.pm,v 1.6 2010/06/27 00:52:33 andrew Exp $ +# $AFresh1: OpenAMD.pm,v 1.7 2010/06/27 03:11:22 andrew Exp $ use warnings; use strict; @@ -10,7 +10,8 @@ my $BASE_URL = 'https://api.hope.net/api/'; -use Class::Std::Utils; +use Scalar::Util qw( refaddr ); +*_ident = \&refaddr; use LWP::UserAgent; use URI; @@ -23,8 +24,8 @@ sub new { my ( $class, $options ) = @_; - my $self = bless anon_scalar(), $class; - my $ident = ident($self); + my $self = bless do { \my $x }, $class; + my $ident = _ident($self); $options //= {}; @@ -40,7 +41,7 @@ sub get { my ( $self, $action, $query ) = @_; - my $ident = ident($self); + my $ident = _ident($self); my $uri = URI->new( $base_url_of{$ident} . '/' . $action ); $uri->query($query); @@ -63,7 +64,7 @@ sub DESTROY { my ($self) = @_; - my $ident = ident $self; + my $ident = _ident $self; foreach my $attr_ref (@attr_refs) { delete $attr_ref->{$ident}; @@ -76,6 +77,7 @@ 1; # Magic true value required at end of module __END__ + =head1 NAME Net::OpenAMD - Perl interface to the OpenAMD API