Class-Tiny-Antlers
view release on metacpan or search on metacpan
"Role::Tiny" : "1.000000"
}
},
"test" : {
"recommends" : {
"Class::Method::Modifiers" : "1.05",
"Role::Tiny" : "1.000000",
"Types::Standard" : "0"
},
"requires" : {
"Test::Fatal" : "0.003",
"Test::More" : "0.96",
"Test::Requires" : "0.06"
}
}
},
"provides" : {
"Class::Tiny::Antlers" : {
"file" : "lib/Class/Tiny/Antlers.pm",
"version" : "0.024"
}
---
abstract: 'Moose-like sugar for Class::Tiny'
author:
- 'Toby Inkster (TOBYINK) <tobyink@cpan.org>'
build_requires:
Test::Fatal: '0.003'
Test::More: '0.96'
Test::Requires: '0.06'
configure_requires:
ExtUtils::MakeMaker: '6.17'
dynamic_config: 0
generated_by: 'Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010'
keywords: []
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
Makefile.PL view on Meta::CPAN
runtime => {
requires => { "Class::Tiny" => 0.006, "perl" => 5.006 },
suggests => { "Class::Method::Modifiers" => 1.05, "Role::Tiny" => "1.000000" },
},
test => {
recommends => {
"Class::Method::Modifiers" => 1.05,
"Role::Tiny" => "1.000000",
"Types::Standard" => 0,
},
requires => { "Test::Fatal" => 0.003, "Test::More" => 0.96, "Test::Requires" => 0.06 },
},
},
"provides" => {
"Class::Tiny::Antlers" => { file => "lib/Class/Tiny/Antlers.pm", version => 0.024 },
},
"release_status" => "stable",
"resources" => {
bugtracker => {
web => "http://rt.cpan.org/Dist/Display.html?Queue=Class-Tiny-Antlers",
},
doap-deps:runtime-suggestion [
doap-deps:on "Role::Tiny 1.000000"^^doap-deps:CpanId;
], [
doap-deps:on "Class::Method::Modifiers 1.05"^^doap-deps:CpanId;
];
doap-deps:test-recommendation [
doap-deps:on "Role::Tiny 1.000000"^^doap-deps:CpanId;
], [
doap-deps:on "Class::Method::Modifiers 1.05"^^doap-deps:CpanId;
], [ doap-deps:on "Types::Standard"^^doap-deps:CpanId ];
doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ], [ doap-deps:on "Test::Fatal 0.003"^^doap-deps:CpanId ], [
doap-deps:on "Test::Requires 0.06"^^doap-deps:CpanId;
];
doap:bug-database <http://rt.cpan.org/Dist/Display.html?Queue=Class-Tiny-Antlers>;
doap:created "2013-08-29"^^xsd:date;
doap:developer <http://purl.org/NET/cpan-uri/person/tobyink>;
doap:download-page <https://metacpan.org/release/Class-Tiny-Antlers>;
doap:homepage <https://metacpan.org/release/Class-Tiny-Antlers>;
doap:license <http://dev.perl.org/licenses/>;
doap:maintainer <http://purl.org/NET/cpan-uri/person/tobyink>;
doap:name "Class-Tiny-Antlers";
t/03defaults.t view on Meta::CPAN
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
use strict;
use warnings;
use Test::More;
use Test::Fatal;
{
package WWW;
use Class::Tiny::Antlers;
use constant STYLE => 'non-coderef default with explicit lazy => 1';
has aaa => (is => 'ro', lazy => 1, default => 11);
has bbb => (is => 'rw', lazy => 1, default => 12);
has ccc => (is => 'rwp', lazy => 1, default => 13);
t/05init_arg.t view on Meta::CPAN
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
use strict;
use warnings;
use Test::More;
use Test::Fatal;
like(
exception { package Bad1; use Class::Tiny::Antlers; has xxx => (init_arg => undef) },
qr{^Class::Tiny does not support init_arg},
"init_arg => undef",
);
like(
exception { package Bad2; use Class::Tiny::Antlers; has xxx => (init_arg => 'yyy') },
qr{^Class::Tiny does not support init_arg},
t/06required.t view on Meta::CPAN
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
use strict;
use warnings;
use Test::More;
use Test::Fatal;
like(
exception { package Bad1; use Class::Tiny::Antlers; has xxx => (required => 1) },
qr{^Class::Tiny::Object::new does not support required attributes},
"required => 1",
);
is(
exception { package Good1; use Class::Tiny::Antlers; has xxx => (required => 0) },
undef,
t/11types-moose.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Requires 'MooseX::Types::Moose';
use Test::Fatal;
{
package Local::Foo;
use MooseX::Types::Moose 'Int';
use Class::Tiny::Antlers;
has foo => (is => 'rw', isa => Int);
};
my $o1 = Local::Foo->new(foo => 42);
is($o1->foo, 42);
t/11types-mouse.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Requires 'MouseX::Types::Mouse';
use Test::Fatal;
{
package Local::Foo;
use MouseX::Types::Mouse 'Int';
use Class::Tiny::Antlers;
has foo => (is => 'rw', isa => Int);
};
my $o1 = Local::Foo->new(foo => 42);
is($o1->foo, 42);
t/11types-nano.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Requires 'Type::Nano';
use Test::Fatal;
{
package Local::Foo;
use Type::Nano 'Int';
use Class::Tiny::Antlers;
has foo => (is => 'rw', isa => Int);
};
my $o1 = Local::Foo->new(foo => 42);
is($o1->foo, 42);
t/11types-specio.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Requires 'Specio::Library::Builtins';
use Test::Fatal;
{
package Local::Foo;
use Specio::Library::Builtins 'Int';
use Class::Tiny::Antlers;
has foo => (is => 'rw', isa => t('Int'));
};
my $o1 = Local::Foo->new(foo => 42);
is($o1->foo, 42);
t/11types.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Requires { 'Type::Tiny' => '1.004000' };
use Test::Fatal;
{
package Local::Foo;
use Types::Standard 'Int', 'Num';
use Class::Tiny::Antlers;
has foo => (is => 'rw', isa => Int->plus_coercions(Num, sub { int($_) }), coerce => 1);
};
my $o1 = Local::Foo->new(foo => 42);
is($o1->foo, 42);
( run in 5.165 seconds using v1.01-cache-2.11-cpan-54e63673c56 )