Do not die if Google Checkout modules are not installed.

        Patch by afuna. 

diffs (22 lines):

diff -r f51750942eb2 -r f14d6f610694 cgi-bin/DW/Shop/Engine/GoogleCheckout.pm
--- a/cgi-bin/DW/Shop/Engine/GoogleCheckout.pm  Wed Feb 17 04:50:44 2010 +0000
+++ b/cgi-bin/DW/Shop/Engine/GoogleCheckout.pm  Wed Feb 17 04:52:18 2010 +0000
@@ -38,6 +38,9 @@ USE
 USE
     warn "NOTE: Google::Checkout::* Perl modules were not found.\n"
         unless $rv;
+
+    # avoid compile error, if we don't have the google checkout modules 
installed
+    our $EMAIL_DELIVERY = eval { no strict "subs"; 
Google::Checkout::General::DigitalContent::EMAIL_DELIVERY };
 }
 
 use base qw/ DW::Shop::Engine /;
@@ -142,7 +145,7 @@ sub checkout_url {
             price       => $item->cost,
             quantity    => 1,
             private     => $item->id,
-            delivery_method => 
Google::Checkout::General::DigitalContent::EMAIL_DELIVERY,
+            delivery_method => 
$DW::Shop::Engine::GoogleCheckout::EMAIL_DELIVERY,
         );
 
         $gcart->add_item( $gitem );
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to