in reply to Business::OnlinePayment sub redefined warnings
From what I can tell, this is not a bug, because you are trying to redefine $tx as you work thru the loop.$ perl -MBusiness::OnlinePayment -we 'for( 1..2 ) { \ my $tx= Business::OnlinePayment->new('AuthorizeNet'); }'
Usually when you use multiple instance of a module, you name your "instances of the module" differently, like $tx and $tx1. Usually you would use a hash, like
The other technique is to only have 1 B::OP object going at any one time, and undef it at the end of each processing loop.my %tx; for(1..2){ $tx{$_}{'object'}=Business::OnlinePayment->new('AuthorizeNet'); }
But I havn't actually tried the module, so I may be missing something. ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Business::OnlinePayment sub redefined warnings
by perrin (Chancellor) on Jun 04, 2005 at 14:19 UTC |