Skip Menu |

This queue is for tickets about the Business-OnlinePayment CPAN distribution.

Report information
The Basics
Id: 22071
Status: resolved
Priority: 0/
Queue: Business-OnlinePayment

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

Bug Information
Severity: Normal
Broken in:
  • 2.01
  • 3.00_01
  • 3.00_02
  • 3.00_03
  • 3.00_04
  • 3.00_05
  • 3.00_06
  • 3.00_07
Fixed in:
  • 3.00
  • 3.00_08
  • 3.00_09



Subject: defined &$class is not how you detect if a class has been loaded
BOP has code in it like this: $subclass = "Foo::Bar"; if (!defined(&$subclass)) { eval "use $subclass"; } That check is not checking that the class Foo::Bar is loaded. It is checking if there is a subroutine named Foo::Bar(). I don't see code in BOP which is defining a sub for each subclass and testing shows this code doesn't really work. What I would suggest instead to ensure you don't initialize a subclass multiple times (which is what this code appears to be attempting) is to simply keep a hash of loaded subclasses inside BOP and check it.