use
strict;
use
warnings;
use
Test::More;
my
$sample
= Sample->new(
name
=>
'hello'
);
isa_ok
$sample
,
'Sample'
;
eval
{
$sample
->name(
''
) };
ok $@,
'invalid name'
;
ok UserName->check(
'hello'
);
ok !UserName->check(
''
);
done_testing;
use
strict;
use
warnings;
use
Test::More;
my
$sample
= Sample->new(
name
=>
'hello'
);
isa_ok
$sample
,
'Sample'
;
eval
{
$sample
->name(
''
) };
ok $@,
'invalid name'
;
ok UserName->check(
'hello'
);
ok !UserName->check(
''
);
done_testing;