FormValidator-Lite

 view release on metacpan or  search on metacpan

lib/FormValidator/Lite/Constraint.pm  view on Meta::CPAN

package FormValidator::Lite::Constraint;
use strict;
use warnings;

sub import {
    strict->import;
    warnings->import;

    no strict 'refs';
    my $pkg = caller(0);
    *{"$pkg\::rule"}    = \&rule;
    *{"$pkg\::file_rule"}    = \&file_rule;
    *{"$pkg\::alias"}   = \&alias;
    *{"$pkg\::delsp"}    = \&delsp;
}

lib/FormValidator/Lite/Constraint.pm  view on Meta::CPAN

__END__

=head1 NAME

FormValidator::Lite::Constraint - utilities for writing constraint rules.

=head1 DESCRIPTION

This module provides some utility classes for writing constraint rules declaratively.

This module enables strict->import and warnings->import automatically.

=head1 FUNCTIONS

=over 4

=item rule($name, $code)

Define new rule.

=item file_rule($name, $code)



( run in 0.452 second using v1.01-cache-2.11-cpan-299005ec8e3 )