in reply to "Can't locate object method 'new' but the package IS 'used'
Foo.pm
package Foo; use Bar; sub new { return bless {}, shift; } 1;
Bar.pm:
package Bar; use Foo; sub new { return bless {}, shift; } my $foo = Foo->new(); 1;
script.pl:
#!/usr/bin/perl use strict; use warnings; use Foo;
|
|---|