beginners:

I'm starting on an OO module, and have put some run-time assertion
subroutines into a function library:

        our %EXPORT_TAGS = ( 'all' => [ qw(
            assert_argument_present
            assert_arguments_gone
            assert_class_method_signature
            assert_defined
            assert_object_method_signature
        ) ] );

Examples of use:

        package Foo;

        sub new
        {
                assert_class_method_signature(__PACKAGE__, \@);

                my $class = shift;

                ### rest of default constructor
        }

        sub clone
        {
                assert_object_method_signature(__PACKAGE__, \@);

                my $self = shift;

                ### rest of clone constructor
        }

Before I get too far down the garden path, I thought I'd see what else
is out there.  Searching CPAN for "assert" yields 187 hits:

    http://search.cpan.org/search?m=all&q=assert&s=1&n=100


What do the readers use and/or recommend?


TIA,

David


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to