typesafety

 view release on metacpan or  search on metacpan

typesafety.pm  view on Meta::CPAN

and adjustment on the part of the programmer.
Also like adapting a program for strict, it's an extremely rewarding habit
to get into for a program that might grow to tens of thousands of lines.
I suggest making it a corporate project (with large sums of money budged
towards consulting fees for me) or else for the adventurous and broad-minded.

IMPORTANT-ish:
There's a good tutorial on strong typing (type safety, type checking)
in my _Perl 6 Now: The Core Ideas Illustrated with Perl 5_ along with
loads of other great stuff (you should buy it just for the two chapters
on coroutines).
See L<http://perl6now.com> for excerpts, more plugging, and links to buy.

=head2 Strong Typing

Failure to keep track what kind of data is in a given variable or returned 
from a given method is an epic source of confusion and frustration during
debugging. 

Given a C<< ->get_pet() >> method, you might try to bathe the output. If it always
a dog during testing, everything is fine, but sooner or later, you're



( run in 0.490 second using v1.01-cache-2.11-cpan-df04353d9ac )