in reply to Is assigning undef required for DESTROY to run?

I want to know what happens with the code:

my $obj1 = Vendor::Library->new(...); my $obj2 = Vendor::Library->new(...);

It sounds like they've got some funny internals that can't handle having more than one object instantiated at a time, in which case they should be checking for that in their new method.

Replies are listed 'Best First'.
Re^2: Is assigning undef required for DESTROY to run?
by MidLifeXis (Monsignor) on Feb 23, 2009 at 20:17 UTC

    Agreed, and that is what my bug report says :-). The connection is supposed to be one-at-a-time, which, to me as well, means that they should be catching if a second call is made before the first connection is released.

    --MidLifeXis

      More than that, IMO, the module shouldn't be advertising the constructor as an integral part of the interface - rather, something more like that shown in Monadic Classes.

      A user level that continues to overstate my experience :-))