Aristotle has asked for the wisdom of the Perl Monks concerning the following question:
Ok, I'm utterly confounded.
{ package Promotion::Promotion; our @ISA = qw( Promotion::DBI ); __PACKAGE__>table( 'promotion' ); __PACKAGE__>columns( All => qw( id name ) ); }
Perl complains that it can't find Promotion::Promotion::table on the respective line.
An intermittently inserted debug print calling can() could find the method though. So:
{ package Promotion::Promotion; our @ISA = qw( Promotion::DBI ); __PACKAGE__->can( 'table' )->( __PACKAGE__, 'promotion' ); __PACKAGE__->can( 'columns' )->( __PACKAGE__, All => qw( id name ) + ); }
This works.
Errm… what's going on here?
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Method lookup fails?
by bmann (Priest) on Jan 11, 2005 at 00:08 UTC | |
by Aristotle (Chancellor) on Jan 11, 2005 at 00:16 UTC |