I'm writing an object that has a fairly generic beginning:
package Module::Name; use strict; BEGIN { use Exporter (); use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 0.01; @ISA = qw (Exporter); @EXPORT = qw (); @EXPORT_OK = qw (bunch_of_methods_and_constant_vars); %EXPORT_TAGS = ( constants => [qw(constant_vars)], ); }
Nothing earth-shattering here. I run this as the initial test:
# -*- perl -*- # t/001_load.t - check module loading and create testing directory use Test::More tests => 2; BEGIN { use_ok(Module::Name qw(:constants)); } my $object = Module::Name->new(); isa_ok ($object, 'Module::Name');
Again, nothing surprising. This is all generated automatically from ExtUtils::MakeMaker. However, I get this output from the 'make test':
t/001_load....NOK 2# Failed test (t/001_load.t at line 12) # The object isn't a 'Module::Name' it's a 'ARRAY'
Why does it think it's an array?
In reply to It is not an array! by hardburn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |