File: Base.pm

package info (click to toggle)
libvalidation-class-perl 7.900058-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,536 kB
  • sloc: perl: 21,493; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package MyApp::Test::Base;

use base 'MyApp::Test::Base::Email';

use Validation::Class;

# rules mixin

mxn basic       => {
    required    => 1,
    max_length  => 255,
    filters     => [qw/trim strip/]
};

fld id          => {
    mixin       => 'basic',
    max_length  => 11,
    required    => 0
};

# build method, run automatically after new()

bld sub {
    
    shift->id(1)
    
};

1;