Skip Menu |

This queue is for tickets about the Google-Checkout CPAN distribution.

Report information
The Basics
Id: 59418
Status: open
Priority: 0/
Queue: Google-Checkout

People
Owner: Nobody in particular
Requestors: diz [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.1.1
Fixed in: (no value)



Subject: UNIVERSAL import deprecation and misuse of isa
beginning with perl 5.12, UNIVERSAL->import is deprecated. it'll be removed in a future perl. using Google::Checkout::General::Util results in the following warning being printed to STDERR: UNIVERSAL->import is deprecated and will be removed in a future perl the issues is the explicit import of the "isa" function on line 103: use UNIVERSAL qw/isa/; instead, isa should be used as an instance method. the method is_object is superfluous. calls to ->is_object should be replaced with calls to - Show quoted text
>isa.
i'm attaching a patch. i'd like to say that the patch passed the tests, but there are none. On Thu Jul 15 13:35:52 2010, DIZ wrote: Show quoted text
> beginning with perl 5.12, UNIVERSAL->import is deprecated. it'll be > removed in a future perl. using Google::Checkout::General::Util
results Show quoted text
> in the following warning being printed to STDERR: > > UNIVERSAL->import is deprecated and will be removed in a future perl > > the issues is the explicit import of the "isa" function on line 103: > > use UNIVERSAL qw/isa/; > > instead, isa should be used as an instance method. the method
is_object Show quoted text
> is superfluous. calls to ->is_object should be replaced with calls to
- Show quoted text
> >isa.
Subject: google-checkout-isa.patch
diff -rNu Google-Checkout-1.1.1-pristine/lib/Google/Checkout/General/Util.pm Google-Checkout-1.1.1/lib/Google/Checkout/General/Util.pm --- Google-Checkout-1.1.1-pristine/lib/Google/Checkout/General/Util.pm 2007-09-28 13:38:27.000000000 -0500 +++ Google-Checkout-1.1.1/lib/Google/Checkout/General/Util.pm 2010-07-15 12:37:49.248414689 -0500 @@ -100,8 +100,6 @@ is_gift_certificate_object is_digital_content is_parameterized_url/; -use UNIVERSAL qw/isa/; - use Date::Manip; use MIME::Base64; use Digest::HMAC_SHA1; @@ -127,56 +125,49 @@ { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::Error"); + return $obj->isa("Google::Checkout::General::Error"); } sub is_merchant_item { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::MerchantItem"); + return $obj->isa("Google::Checkout::General::MerchantItem"); } sub is_shipping_method { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::Shipping"); + return $obj->isa("Google::Checkout::General::Shipping"); } sub is_tax_table { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::TaxTable"); + return $obj->isa("Google::Checkout::General::TaxTable"); } sub is_gift_certificate_object { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::GiftCertificate"); + return $obj->isa("Google::Checkout::General::GiftCertificate"); } sub is_digital_content { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::DigitalContent"); + return $obj->isa("Google::Checkout::General::DigitalContent"); } sub is_parameterized_url { my ($obj) = @_; - return is_object($obj, "Google::Checkout::General::ParameterizedUrl"); -} - -sub is_object -{ - my ($obj, $name) = @_; - - return isa $obj, $name; + return $obj->isa("Google::Checkout::General::ParameterizedUrl"); } #--