FreakyGreenLeaky has asked for the wisdom of the Perl Monks concerning the following question:
Is there a cleaner way?package Util::Stuff::abc; sub attrib1 { 1 } sub attrib2 { 10 } ... eval { $symref->attrib1; }; if (!$@) { ... $symref->attrib1 is OK ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing package membership
by GrandFather (Saint) on Nov 21, 2008 at 08:45 UTC | |
by FreakyGreenLeaky (Sexton) on Nov 21, 2008 at 09:01 UTC | |
by GrandFather (Saint) on Nov 21, 2008 at 09:43 UTC | |
by LanX (Saint) on Nov 21, 2008 at 10:19 UTC | |
|
Re: Testing package membership
by moritz (Cardinal) on Nov 21, 2008 at 08:46 UTC | |
by FreakyGreenLeaky (Sexton) on Nov 21, 2008 at 09:10 UTC | |
by FreakyGreenLeaky (Sexton) on Nov 21, 2008 at 08:56 UTC | |
by Anonymous Monk on Nov 21, 2008 at 18:11 UTC |