$subject =~ s/Perl //;
If you modify is_built as you show at the end, it's no longer a class method and wouldn't work when called Gadget->is_built( $foo ), but we'll presume that's a typo :).
If you really want to disallow calls on instances, check that the first argument isn't a reference (and you can even go as far as checking that it's not a reference and it isa('Gadget')). Perl is giving you the freedom to shoot yourself in the foot, or to post armed guards to shoot improper callers in thier feet.
In reply to Re: poor Perl OO design hinders maintenance effectiveness..
by Fletch
in thread poor Perl OO design hinders maintenance effectiveness..
by vladb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |