Benchmark-DKbench
view release on metacpan or search on metacpan
data/t/attributes/attribute_type_unions.t
data/t/attributes/attribute_without_any_methods.t
data/t/attributes/attribute_writer_generation.t
data/t/attributes/bad_coerce.t
data/t/attributes/chained_coercion.t
data/t/attributes/clone_weak.t
data/t/attributes/default_class_role_types.t
data/t/attributes/default_undef.t
data/t/attributes/delegation_and_modifiers.t
data/t/attributes/delegation_arg_aliasing.t
data/t/attributes/delegation_target_not_loaded.t
data/t/attributes/illegal_options_for_inheritance.t
data/t/attributes/inherit_lazy_build.t
data/t/attributes/lazy_no_default.t
data/t/attributes/method_generation_rules.t
data/t/attributes/misc_attribute_coerce_lazy.t
data/t/attributes/misc_attribute_tests.t
data/t/attributes/more_attr_delegation.t
data/t/attributes/no_init_arg.t
data/t/attributes/no_slot_access.t
data/t/attributes/non_alpha_attr_names.t
data/t/attributes/attribute_inherited_slot_specs.t view on Meta::CPAN
::isnt( ::exception {
has '+blang' => (handles => ['hello']);
}, undef, '... we can not alter the handles attribute option' );
::is( ::exception {
has '+fail' => (isa => 'Ref');
}, undef, '... can now create an attribute with an improper subtype relation' );
::isnt( ::exception {
has '+other_fail' => (trigger => sub {});
}, undef, '... cannot create an attribute with an illegal option' );
::like( ::exception {
has '+does_not_exist' => (isa => 'Str');
}, qr/in Bar/, '... cannot extend a non-existing attribute' );
}
my $foo = Foo->new;
isa_ok($foo, 'Foo');
is($foo->foo, undef, '... got the right undef default value');
is( exception { $foo->foo('FooString') }, undef, '... assigned foo correctly' );
is($foo->foo, 'FooString', '... got the right value for foo');
data/t/recipes/roles_comparable_codereuse.t view on Meta::CPAN
# =begin testing SETUP
{
package Eq;
use Moose::Role;
requires 'equal_to';
sub not_equal_to {
my ( $self, $other ) = @_;
not $self->equal_to($other);
}
package Comparable;
use Moose::Role;
with 'Eq';
requires 'compare';
data/t/recipes/roles_comparable_codereuse.t view on Meta::CPAN
is( $fifty->amount, 50, '... got the right amount' );
can_ok( $fifty, 'to_string' );
is( $fifty->to_string, '$50.00 USD', '... got the right stringified value' );
ok( $hundred->greater_than($fifty), '... 100 gt 50' );
ok( $hundred->greater_than_or_equal_to($fifty), '... 100 ge 50' );
ok( !$hundred->less_than($fifty), '... !100 lt 50' );
ok( !$hundred->less_than_or_equal_to($fifty), '... !100 le 50' );
ok( !$hundred->equal_to($fifty), '... !100 eq 50' );
ok( $hundred->not_equal_to($fifty), '... 100 ne 50' );
ok( !$fifty->greater_than($hundred), '... !50 gt 100' );
ok( !$fifty->greater_than_or_equal_to($hundred), '... !50 ge 100' );
ok( $fifty->less_than($hundred), '... 50 lt 100' );
ok( $fifty->less_than_or_equal_to($hundred), '... 50 le 100' );
ok( !$fifty->equal_to($hundred), '... !50 eq 100' );
ok( $fifty->not_equal_to($hundred), '... 50 ne 100' );
ok( !$fifty->greater_than($fifty), '... !50 gt 50' );
ok( $fifty->greater_than_or_equal_to($fifty), '... !50 ge 50' );
ok( !$fifty->less_than($fifty), '... 50 lt 50' );
ok( $fifty->less_than_or_equal_to($fifty), '... 50 le 50' );
ok( $fifty->equal_to($fifty), '... 50 eq 50' );
ok( !$fifty->not_equal_to($fifty), '... !50 ne 50' );
## ... check some meta-stuff
# Eq
my $eq_meta = Eq->meta;
isa_ok( $eq_meta, 'Moose::Meta::Role' );
ok( $eq_meta->has_method('not_equal_to'), '... Eq has_method not_equal_to' );
ok( $eq_meta->requires_method('equal_to'),
'... Eq requires_method not_equal_to' );
# Comparable
my $comparable_meta = Comparable->meta;
isa_ok( $comparable_meta, 'Moose::Meta::Role' );
ok( $comparable_meta->does_role('Eq'), '... Comparable does Eq' );
foreach my $method_name (
qw(
equal_to not_equal_to
greater_than greater_than_or_equal_to
less_than less_than_or_equal_to
)
) {
ok( $comparable_meta->has_method($method_name),
'... Comparable has_method ' . $method_name );
}
ok( $comparable_meta->requires_method('compare'),
'... Comparable requires_method compare' );
data/t/recipes/roles_comparable_codereuse.t view on Meta::CPAN
ok( $currency_meta->does_role('Comparable'),
'... US::Currency does Comparable' );
ok( $currency_meta->does_role('Eq'), '... US::Currency does Eq' );
ok( $currency_meta->does_role('Printable'),
'... US::Currency does Printable' );
foreach my $method_name (
qw(
amount
equal_to not_equal_to
compare
greater_than greater_than_or_equal_to
less_than less_than_or_equal_to
to_string
)
) {
ok( $currency_meta->has_method($method_name),
'... US::Currency has_method ' . $method_name );
}
}
data/wiki2.html view on Meta::CPAN
<li><a href="https://memory-alpha.fandom.com/wiki/Performers_considered_for_Star_Trek_roles" title="Performers considered for Star Trek roles">Performers considered for roles</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Performers_whose_scenes_were_cut" title="Performers whose scenes were cut">Performers whose scenes were cut</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Recurring_characters" title="Recurring characters">Recurring characters</a></li></ul></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Category:Writers" title="Category:Writers">Writers</a></li></ul></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Star_Trek_auctions" title="Star Trek auctions"><i>Star Trek</i> auctions</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Star_Trek_fonts" title="Star Trek fonts"><i>Star Trek</i> fonts</a></li></ul>
<h3><span class="mw-headline" id="Other_topics">Other topics</span></h3>
<ul><li><a href="https://memory-alpha.fandom.com/wiki/47" title="47">47</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Bottle_show" title="Bottle show">Bottle show</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Design_patent" class="mw-redirect" title="Design patent">Design patents</a> filed for the <i>Star Trek</i> franchise</li>
<li><a href="https://memory-alpha.fandom.com/wiki/I%27m_a_doctor,_not_a..." title="I'm a doctor, not a...">I'm a doctor, not a...</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Redshirt" title="Redshirt">Redshirt</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/William_Shakespeare#Background" title="William Shakespeare">Shakespeare and <i>Star Trek</i></a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Stardate" title="Stardate">Stardates</a></li>
<li><a href="https://memory-alpha.fandom.com/wiki/Story_arcs" title="Story arcs">Story arcs</a></li></ul>
<h2><span class="mw-headline" id="External_links">External links</span></h2>
<ul><li><span class="noicon"><a target="_blank" rel="nofollow noreferrer noopener" class="external text" href="http://startrek.com/">The official <i>Star Trek</i> home page</a></span></li>
<li><span class="noicon"><a target="_blank" rel="nofollow noreferrer noopener" class="external text" href="https://www.youtube.com/user/startrek">The official <i>Star Trek</i> YouTube channel</a> at <a target="_blank" rel="nofollow noreferrer no...
<li><span class="noicon"><a href="http://en.wikipedia.org/wiki/Star_Trek" class="extiw" title="wikipedia:Star Trek"><i>Star Trek</i></a> at <a href="http://en.wikipedia.org/wiki/" class="extiw" title="wikipedia:">Wikipedia</a></span></li>
<li><span class="noicon"><a href="http://en.wikipedia.org/wiki/Star_Trek_spin-off_fiction" class="extiw" title="wikipedia:Star Trek spin-off fiction"><i>Star Trek</i> spin-off fiction</a> at <a href="http://en.wikipedia.org/wiki/" class="extiw" title...
<li><span class="noicon"><a target="_blank" rel="nofollow noreferrer noopener" class="external text" href="http://bbc.co.uk/cult/st/"><i>Star Trek</i></a> at <a target="_blank" rel="nofollow noreferrer noopener" class="external text" href="http://bbc...
( run in 0.384 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )