Skip Menu |

This queue is for tickets about the Shipment CPAN distribution.

Report information
The Basics
Id: 90660
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Shipment

People
Owner: Nobody in particular
Requestors: upasna.shukla [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.16



Subject: New Moose may break your code
Date: Sat, 23 Nov 2013 07:57:27 +0530
To: bug-Shipment [...] rt.cpan.org
From: "Upasana Shukla" <upasna.shukla [...] gmail.com>
We recently changed the syntax of enum declarations in Moose types. It appears that your module is affected. You can read more about the change here: https://metacpan.org/pod/release/ETHER/Moose-2.1106-TRIAL/lib/Moose/Manual/Delta.pod#pod2.1200 We recommend that you take a look at your code to see if it indeed does need to be updated with respect to the latest Moose release, 2.1106-TRIAL. If you have any questions, then please ask either on Moose mailing list : http://lists.perl.org/list/moose.html or on #moose & #moose-dev on irc.perl.org.
Attached patch fixes the issue. -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]
Subject: Shipment-0.14.patch
diff -Naur Shipment-0.14_orig/lib/Shipment/Base.pm Shipment-0.14/lib/Shipment/Base.pm --- Shipment-0.14_orig/lib/Shipment/Base.pm 2014-01-22 18:27:39.817530625 -0500 +++ Shipment-0.14/lib/Shipment/Base.pm 2014-01-22 19:41:25.013588605 -0500 @@ -47,7 +47,7 @@ ); -enum 'BillingOptions' => qw( sender recipient third_party ); +enum 'BillingOptions' => [qw( sender recipient third_party )]; has 'bill_type' => ( is => 'rw', @@ -56,7 +56,7 @@ ); -enum 'PickupOptions' => qw( pickup dropoff ); +enum 'PickupOptions' => [qw( pickup dropoff )]; has 'pickup_type' => ( is => 'rw', @@ -65,7 +65,7 @@ ); -enum 'PrinterOptions' => qw( pdf thermal image ); +enum 'PrinterOptions' => [qw( pdf thermal image )]; has 'printer_type' => ( is => 'rw', @@ -74,7 +74,7 @@ ); -enum 'SignatureOptions' => qw( default required not_required adult ); +enum 'SignatureOptions' => [qw( default required not_required adult )]; has 'signature_type' => ( is => 'rw', @@ -83,7 +83,7 @@ ); -enum 'PackageOptions' => qw( custom envelope tube box pack ); +enum 'PackageOptions' => [qw( custom envelope tube box pack )]; has 'package_type' => ( is => 'rw', diff -Naur Shipment-0.14_orig/lib/Shipment/FedEx.pm Shipment-0.14/lib/Shipment/FedEx.pm --- Shipment-0.14_orig/lib/Shipment/FedEx.pm 2014-01-22 18:27:39.817530625 -0500 +++ Shipment-0.14/lib/Shipment/FedEx.pm 2014-01-22 19:43:24.069590165 -0500 @@ -47,7 +47,7 @@ ); -enum 'LabelStockOptions' => qw( +enum 'LabelStockOptions' => [qw( STOCK_4X6 STOCK_4X6.75_LEADING_DOC_TAB STOCK_4X6.75_TRAILING_DOC_TAB @@ -61,7 +61,7 @@ PAPER_8.5X11_BOTTOM_HALF_LABEL PAPER_8.5X11_TOP_HALF_LABEL PAPER_LETTER -); +)]; has 'label_stock_type' => ( is => 'rw', @@ -77,7 +77,7 @@ -enum 'BillingOptions' => qw( sender recipient third_party collect ); +enum 'BillingOptions' => [qw( sender recipient third_party collect )]; has '+bill_type' => ( isa => 'BillingOptions', @@ -130,7 +130,7 @@ ); -enum 'PackageOptions' => qw( custom envelope tube box pack FEDEX_10KG_BOX FEDEX_25KG_BOX ); +enum 'PackageOptions' => [qw( custom envelope tube box pack FEDEX_10KG_BOX FEDEX_25KG_BOX )]; has '+package_type' => ( isa => 'PackageOptions', diff -Naur Shipment-0.14_orig/lib/Shipment/Temando.pm Shipment-0.14/lib/Shipment/Temando.pm --- Shipment-0.14_orig/lib/Shipment/Temando.pm 2014-01-22 18:27:39.817530625 -0500 +++ Shipment-0.14/lib/Shipment/Temando.pm 2014-01-22 19:44:16.933590856 -0500 @@ -79,7 +79,7 @@ -enum 'BillingOptions' => qw( sender account credit credit_card ); +enum 'BillingOptions' => [qw( sender account credit credit_card )]; has '+bill_type' => ( isa => 'BillingOptions', @@ -128,7 +128,7 @@ ); -enum 'PackageOptions' => keys %package_type_map; +enum 'PackageOptions' => [keys %package_type_map]; has '+package_type' => ( isa => 'PackageOptions', diff -Naur Shipment-0.14_orig/lib/Shipment/UPS.pm Shipment-0.14/lib/Shipment/UPS.pm --- Shipment-0.14_orig/lib/Shipment/UPS.pm 2014-01-22 18:27:39.817530625 -0500 +++ Shipment-0.14/lib/Shipment/UPS.pm 2014-01-22 19:43:46.925590464 -0500 @@ -136,7 +136,7 @@ ); -enum 'PackageOptions' => qw( custom envelope tube box pack 25kg_box 10kg_box pallet small_express_box medium_express_box large_express_box ); +enum 'PackageOptions' => [qw( custom envelope tube box pack 25kg_box 10kg_box pallet small_express_box medium_express_box large_express_box )]; has '+package_type' => ( isa => 'PackageOptions', @@ -160,7 +160,7 @@ ); -enum 'PrinterOptions' => qw( thermal image ZPL SPL STARPL ); +enum 'PrinterOptions' => [qw( thermal image ZPL SPL STARPL )]; has '+printer_type' => ( default => 'image',
patch applied in version 0.16