# test parameterizable
-ok ! exception {
+is( exception {
$params->parameterizable( { a => 'Hello', b => 'World' } );
-}, => 'No problem setting parameterizable';
+}, undef, 'No problem setting parameterizable' );
is_deeply $params->parameterizable,
{ a => 'Hello', b => 'World' } => 'Got expected values';
# test parameterized
-ok ! exception {
+is( exception {
$params->parameterized( { a => 1, b => 2 } );
-}, => 'No problem setting parameterized';
+}, undef, 'No problem setting parameterized' );
is_deeply $params->parameterized, { a => 1, b => 2 } => 'Got expected values';
-like exception {
+like( exception {
$params->parameterized( { a => 'Hello', b => 'World' } );
- },, qr/Attribute \(parameterized\) does not pass the type constraint/ =>
- 'parameterized throws expected error';
+ }, qr/Attribute \(parameterized\) does not pass the type constraint/, 'parameterized throws expected error' );
# test from_parameterizable
-ok ! exception {
+is( exception {
$params->from_parameterizable( { a => 1, b => 2 } );
-}, => 'No problem setting from_parameterizable';
+}, undef, 'No problem setting from_parameterizable' );
is_deeply $params->from_parameterizable,
{ a => 1, b => 2 } => 'Got expected values';
-like exception {
+like( exception {
$params->from_parameterizable( { a => 'Hello', b => 'World' } );
- },,
- qr/Attribute \(from_parameterizable\) does not pass the type constraint/
- => 'from_parameterizable throws expected error';
+ }, qr/Attribute \(from_parameterizable\) does not pass the type constraint/, 'from_parameterizable throws expected error' );
done_testing;