package My_mod; require Exporter; @ISA = qw(Exporter Class::DBI); @EXPORT = qw/get_something/; use My_mod::table1;But Perl complains
Can't locate object method "table" via package "My_mod::table1" at My_mod/table1.pm line 6.Why does putting Class::DBI in @ISA not work?
They're methods, not functions. Methods need an invocant. That's why they're methods, not functions.
If you really want to do this, you have to install thunk functions in your package that, presumably, close over the invocant class name and call the methods directly. If you do that though, there's little reason to inherit from CPAN://Class::DBI.
perlmonks.org content © perlmonks.org and Anonymous Monk, chromatic
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03