shemp has asked for the wisdom of the Perl Monks concerning the following question:
This does not work, i get the errorUndefined subroutine &Blah::can called at Blah.pl line 13.use Class::Struct; struct Blah => { 'data_1' => $, 'data_2' => $, }; if ( Blah::can('data_1') ) { print "Blah can data_1\n"; } else { print "Blah can NOT data_1\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using can() without an object instance?
by dragonchild (Archbishop) on Jun 29, 2004 at 17:29 UTC | |
by shemp (Deacon) on Jun 29, 2004 at 17:40 UTC |