![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re^2: scope and declaration in local packagesby december (Pilgrim) |
on Jan 31, 2011 at 13:39 UTC ( #885271=note: print w/replies, xml ) | Need Help?? |
The code is a lot larger than that. This function however just checks a regex and should work without any instance being in existence, i.e. as a class method. I just wanted to store the regex inside the object so I can check if any input can actually be made into this object without actually trying to create an instance. This one function isn't actually strictly speaking OO at all. In pseudo-code, I just want to be able to say: if Dog::looks_like_a_dog, then dog = Dog->make_a_dog().
In Section
Seekers of Perl Wisdom
|
|