view release on metacpan or search on metacpan
lib/Marketplace/Ebay/Order.pm view on Meta::CPAN
Always returns C<ebay>
=cut
has order => (is => 'ro', isa => HashRef, required => 1);
sub shop_type {
return 'ebay';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Marketplace/Rakuten/Order.pm view on Meta::CPAN
Always returns C<rakuten>
=cut
has order => (is => 'ro', isa => HashRef, required => 1);
sub shop_type {
return 'rakuten';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MarpaX/Java/ClassFile/Role/Parser.pm view on Meta::CPAN
#
# Parameters with a default
#
has marpaRecceHook => ( is => 'ro', prod_isa(Bool), default => sub { 1 });
has constant_pool_count => ( is => 'ro', prod_isa(PositiveOrZeroInt), default => sub { 0 } );
has constant_pool => ( is => 'ro', prod_isa(ArrayRef), default => sub { [] });
has pos => ( is => 'rwp', prod_isa(PositiveOrZeroInt), default => sub { 0 });
has exhaustion => ( is => 'ro', prod_isa(Str), default => sub { 'event' });
has parent => ( is => 'ro', prod_isa(Undef|ConsumerOf['MarpaX::Java::ClassFile::Role::Parser']), default => sub { return });
#
# Lazy parameters
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MarpaX/Role/Parameterized/ResourceIdentifier/BNF.pm view on Meta::CPAN
_COUNT_STRUCTS => 5
};
#
# Just a helper for me
#
has _indice_description => ( is => 'ro', isa => ArrayRef[Str], default => sub {
[
'Raw structure ',
'Normalized structure',
'Escaped structure',
'Unescaped structure',
lib/MarpaX/Role/Parameterized/ResourceIdentifier/BNF.pm view on Meta::CPAN
#
# The lazy builders that implementation should around
#
foreach (@names) {
my $builder = "build_$_";
has $_ => (is => 'ro', isa => HashRef[CodeRef],
lazy => 1,
builder => $builder,
handles_via => 'Hash',
handles => {
"get_$_" => 'get',
lib/MarpaX/Role/Parameterized/ResourceIdentifier/BNF.pm view on Meta::CPAN
my $_type_wrapper = "_${type}_wrapper";
my $_type_wrapper_call_lazy_builder = "_${type}_wrapper_call_lazy_builder";
#
# Just a convenient thing for us
#
has $_type_names => (is => 'ro', isa => ArrayRef[Str|Undef], default => sub { \@names });
#
# The important thing is these wrappers:
# - the one using accessors so that we are sure builders are executed
# - the one without the accessors for performance
#
has $_type_wrapper => (is => 'ro', isa => ArrayRef[CodeRef|Undef],
# lazy => 1, Not lazy and this is INTENTIONAL
handles_via => 'Array',
handles => {
"_get_$type" => 'get'
},
default => sub {
$_[0]->_build_impl_sub(0, @names)
}
);
has $_type_wrapper_call_lazy_builder => (is => 'ro', isa => ArrayRef[CodeRef|Undef],
# lazy => 1, Not lazy and this is INTENTIONAL
handles_via => 'Array',
handles => {
"_get_${type}_call_lazy_builder" => 'get'
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mason/Plugin/Cache/Interp.pm view on Meta::CPAN
use Mason::Util qw(catdir);
use Mason::PluginRole;
# Passed attributes
#
has 'cache_defaults' => ( is => 'ro', isa => 'HashRef', lazy_build => 1 );
has 'cache_root_class' => ( is => 'ro', isa => 'Str', default => 'CHI' );
method _build_cache_defaults () {
return {
driver => 'File',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mason/CodeCache.pm view on Meta::CPAN
$Mason::CodeCache::VERSION = '2.24';
use Devel::GlobalDestruction;
use Mason::Moose;
use Mason::Util;
has 'datastore' => ( is => 'ro', isa => 'HashRef', default => sub { {} } );
method get ($key) {
return $self->{datastore}->{$key};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mastodon/Entity/Context.pm view on Meta::CPAN
with 'Mastodon::Role::Entity';
use Types::Standard qw( ArrayRef );
use Mastodon::Types qw( Status );
has ancestors => ( is => 'ro', isa => ArrayRef [Status], required => 1, );
has descendants => ( is => 'ro', isa => ArrayRef [Status], );
1;
=encoding utf8
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/InterpolationCompiler.pm view on Meta::CPAN
our $VERSION= '0.002000';
# ABSTRACT: Compile interpolations into perl coderefs
has domain => ( is => 'ro', isa => Types::Standard::ArrayRef, required => 1 );
has range => ( is => 'ro', isa => Types::Standard::ArrayRef, required => 1 );
has algorithm => ( is => 'ro', default => sub { 'linear' } );
has beyond_domain => ( is => 'ro', default => sub { 'clamp' } );
has perl_code => ( is => 'lazy' );
has fn => ( is => 'lazy' );
has sanitize => ( is => 'ro', default => sub { 1 } );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MeSH/Parser/ASCII.pm view on Meta::CPAN
Log::Log4perl->easy_init( { level => $INFO, layout => '%-5p - %m%n' } );
our $VERSION = 0.03;
has 'meshfile' => ( is => 'rw', isa => 'Str', required => 1 );
has 'heading' => ( is => 'ro', isa => 'HashRef', default => sub { {} } );
sub parse() {
my $self = shift;
INFO 'Parsing file ' . $self->meshfile . ' ...';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Method/ParamValidator/Key/Field.pm view on Meta::CPAN
use Method::ParamValidator::Key::Field::DataType qw(:all);
has 'name' => (is => 'ro', isa => Str, required => 1);
has 'format' => (is => 'ro', isa => Str, default => sub { 's' });
has 'check' => (is => 'rw', isa => CodeRef, predicate => 1);
has 'source' => (is => 'ro', isa => HashRef[Str], predicate => 1);
has 'message' => (is => 'ro', isa => Str);
has 'multi' => (is => 'ro');
sub str { !(defined $_[0] && $_[0] =~ /^\d+$/) };
sub int { (defined $_[0] && $_[0] =~ /^\d+$/) };
view all matches for this distribution
view release on metacpan or search on metacpan
WIP/blib/lib/Mildew/AST/Block.pm view on Meta::CPAN
class Mildew::AST::Block extends Mildew::AST::Base {
has 'stmts' => (is=>'ro',isa=>'ArrayRef[Mildew::AST::Base]');
has 'regs' => (is=>'ro',default=>sub {[]},isa=>'ArrayRef[Str]');
method m0ld($ret) {
"my $ret = mold {\n"
. join('',map {'my $'.$_.";\n"} @{$self->regs})
. join("",map { $_->m0ld('$void') } @{$self->stmts})
. "};\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/Faker/Dist.pm view on Meta::CPAN
#pod =cut
# Module::Faker options
has cpan_author => (is => 'ro', isa => 'Maybe[Str]', default => 'LOCAL');
has archive_ext => (is => 'ro', isa => 'Str', default => 'tar.gz');
has append => (is => 'ro', isa => 'ArrayRef[HashRef]', default => sub {[]});
has mtime => (is => 'ro', isa => 'Int', predicate => 'has_mtime');
#pod =attr x_authority
#pod
#pod This is the C<X_Authority> header that gets put into the META files.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/Provision/Base.pm view on Meta::CPAN
option 'perms' => is => 'ro', isa => OctalNum, format => 'i',
documentation => 'Default permission for file / directory creation',
default => '640', coerce => TRUE;
option 'plugins' => is => 'ro', isa => ArrayRef[NonEmptySimpleStr],
documentation => 'Name of optional plugins to load, comma separated list',
builder => sub { [] }, format => 's', short => 'M',
coerce => sub { (is_arrayref $_[ 0 ])
? $_[ 0 ] : [ split m{ , }mx, $_[ 0 ] ] };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojo/PDF/Primitive/Table.pm view on Meta::CPAN
has at => (
is => 'ro',
required => 1,
isa => Tuple[ StrictNum, StrictNum ],
);
has data => ( is => 'ro', required => 1, isa => ArrayRef, );
has pdf => (
is => 'ro',
required => 1,
isa => InstanceOf['Mojo::PDF'],
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MongoDBx/Class.pm view on Meta::CPAN
=cut
has 'namespace' => (is => 'ro', isa => 'Str', required => 1);
has 'search_dirs' => (is => 'ro', isa => 'ArrayRef[Str]', default => sub { [] });
has 'doc_classes' => (is => 'ro', isa => 'HashRef', default => sub { {} });
=head2 namespace
A string representing the namespace of the MongoDB schema used (e.g.
C<MyApp::Schema>). Your document classes, structurally speaking, should be
view all matches for this distribution
view release on metacpan or search on metacpan
# from RT Bug #81725
package Bar;
use Moose;
with 'Mongoose::Document';
has y => ( is => 'ro', isa => 'HashRef[ArrayRef[Foo]]' );
package Foo;
use Moose;
with 'Mongoose::EmbeddedDocument';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Monorail/Change/AddField.pm view on Meta::CPAN
has type => (is => 'ro', isa => 'Str', required => 1);
has is_nullable => (is => 'ro', isa => 'Bool', required => 1, default => 1);
has is_primary_key => (is => 'ro', isa => 'Bool', required => 1, default => 0);
has is_unique => (is => 'ro', isa => 'Bool', required => 1, default => 0);
has default_value => (is => 'ro', isa => 'Any', required => 0);
has size => (is => 'ro', isa => 'ArrayRef', required => 0);
__PACKAGE__->meta->make_immutable;
sub as_sql {
view all matches for this distribution
view release on metacpan or search on metacpan
xt/croak-locations.t view on Meta::CPAN
location_ok <<'END_CODE', 'Moo::Role::_inhale_if_moose - isa from type';
BEGIN {
eval qq{
package ${PACKAGE}::Role;
use Moose::Role;
has attr1 => (is => 'ro', isa => 'HashRef');
1;
} or die $@;
}
use Moo;
with "${PACKAGE}::Role";
view all matches for this distribution
view release on metacpan or search on metacpan
t/12-args.t view on Meta::CPAN
has 'error2' => ( is => 'ro' );
has 'class2' => ( is => 'ro', isa => Str );
has 'num' => ( is => 'ro' ); # can be anything
has 'args' => ( is => 'ro', isa => ArrayRef );
our $count = 0;
sub alt_new {
++$count;
view all matches for this distribution
view release on metacpan or search on metacpan
t/11-construct_attribute.t view on Meta::CPAN
expected => 'Hello World',
name => '_construct_attributes with a Type::Tiny Isa',
);
run_test_isa(
args => ['ro', HashRef, ],
expected => 'Hello World',
name => '_construct_attributes with a Type::Tiny Isa',
);
run_test_isa(
args => ['ro', [qw/one two three/], { isa => ArrayRef }],
expected => 'Hello World',
name => '_construct_attributes with a Type::Tiny Isa',
);
sub run_test {
view all matches for this distribution
view release on metacpan or search on metacpan
t/parameterized_inflate.t view on Meta::CPAN
eval q{
package Local::TestClass;
use Moo;
use MooX::Types::MooseLike::Base qw( Enum AnyOf Str ArrayRef ScalarRef HashRef HasMethods );
has chipmunk => (is => 'ro', isa => Enum[qw(Alvin Simon Theodore)]);
has songs => (is => 'ro', isa => AnyOf[ Str, ArrayRef[Str] ]);
has complex => (is => 'ro', isa => HashRef[ArrayRef[ScalarRef[HasMethods[qw/foo bar/]]]]);
1;
} or die $@;
is(
exception { Local::TestClass->new(chipmunk => 'Simon', songs => []) },
view all matches for this distribution
view release on metacpan or search on metacpan
examples/bench.pl view on Meta::CPAN
package Local::Standard;
use Moo;
use Types::Common -types;
has n => ( is => 'ro', isa => Int, required => 1 );
has children => ( is => 'ro', isa => ArrayRef, lazy => 1, builder => '_build_children' );
has sum => ( is => 'ro', isa => Int, lazy => 1, builder => '_build_sum' );
sub _build_children {
my $self = shift;
return [] if $self->n < 1;
examples/bench.pl view on Meta::CPAN
use Moo;
use MooX::XSConstructor;
use Types::Common -types;
has n => ( is => 'ro', isa => Int, required => 1 );
has children => ( is => 'ro', isa => ArrayRef, lazy => 1, builder => '_build_children' );
has sum => ( is => 'ro', isa => Int, lazy => 1, builder => '_build_sum' );
sub _build_children {
my $self = shift;
return [] if $self->n < 1;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/simple.pl view on Meta::CPAN
package Foo;
use Moo;
use MooX::late;
has bar => (is => 'ro', isa => 'Str|ArrayRef[Int|Num]|Int');
Foo->new(bar => [1, '2o', 3])
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Documentation.pm view on Meta::CPAN
with 'Dist::Zilla::Role::MetaProvider';
sub mvp_multivalue_args { 'module' }
has module => (
is => 'ro', isa => 'ArrayRef[Str]',
required => 1,
);
sub metadata
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooseX/AbstractFactory/Role.pm view on Meta::CPAN
our $VERSION = '0.004003'; # VERSION
our $AUTHORITY = 'cpan:PENFOLD';
has _options => (is => 'ro', isa => 'ArrayRef[Any]');
has _implementation => (is => 'ro', isa => 'Str');
sub create {
my ($class, $impl, @impl_args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-standard_coercion.t view on Meta::CPAN
return shift @{$_};
};
has test_str_coerce => (is => 'ro', isa => 'TestStr', coerce => 1);
has test_int_coerce => (is => 'ro', isa => 'TestInt', coerce => 1);
has test_arrayref_coerce => (is => 'ro', isa => 'TestClass::TestArrayRef', coerce => 1);
has test_hashref_coerce => (is => 'ro', isa => 'TestClass::TestHashRef', coerce => 1);
has test_str_from_array_coerce => (is => 'ro', isa => 'TestStr', coerce => 1);
STR_COERCION: {
my $test;
eval { $test = __PACKAGE__->new( test_str_coerce => '1') };
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/ConfigCascade/Test/Book.pm view on Meta::CPAN
package ConfigCascade::Test::Book;
use Moose;
with 'MooseX::ConfigCascade';
has pages => (is => 'ro', isa => 'ArrayRef');
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooseX/CurriedHandles.pm view on Meta::CPAN
use Moose;
use Scalar::Util qw(blessed);
our $VERSION = '0.03';
extends 'Moose::Meta::Attribute';
has curried_handles => ( is => 'ro', isa => 'HashRef', default => sub { {} } );
after 'attach_to_class' => sub {
my ($attr, $class) = @_;
foreach my $method_name (keys %{ $attr->curried_handles }) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooseX/DIC/Configuration/ServiceMetadata.pm view on Meta::CPAN
use constant DEFAULT_BUILDER => 'Moose';
has class_name => ( is => 'ro', isa => 'Str', required => 1 );
has implements => ( is => 'ro', isa => 'Str', required => 1 );
has scope => ( is => 'ro', isa => 'ServiceScope', default => DEFAULT_SCOPE );
has qualifiers => ( is => 'ro', isa => 'ArrayRef[Str]', default => sub { [] } );
has environment => ( is => 'ro', isa => 'Str', default => DEFAULT_ENVIRONMENT );
has builder => ( is => 'ro', isa => 'Str', default => DEFAULT_BUILDER );
has dependencies => ( is => 'ro', isa => 'HashRef[MooseX::DIC::Configuration::ServiceMetadata::Dependency]', default => sub {{}} );
__PACKAGE__->meta->make_immutable;
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooseX/DeepAccessors.pm view on Meta::CPAN
use Moose;
use Scalar::Util qw(blessed);
our $VERSION = '0.02';
extends 'Moose::Meta::Attribute';
has deep_accessors => ( is => 'ro', isa => 'HashRef', default => sub { {} } );
after 'attach_to_class' => sub {
my ($attr, $class) = @_;
foreach my $method_name (keys %{ $attr->deep_accessors }) {
view all matches for this distribution