1 use Test::More tests => 4;
9 use MooseX::Params::Validate;
11 qw{""} => 'to_string',
17 default => '1.10.100',
21 my ( $self, %args ) = validated_hash(
30 # 1.10.100 => 0001.0010.0100
34 map { sprintf( "%04d", $_ ) } split( /\./, $self->id ) )
41 isa_ok( my $foo = Foo->new(), 'Foo', 'new' );
43 is( $foo->id, '1.10.100', 'id' );
45 is( $foo->to_string, '1.10.100', 'to_string' );
48 $foo->to_string( padded => 1 ), '0001.0010.0100',
49 'to_string( padded => 1 )'