Aion
view release on metacpan or search on metacpan
"web" : "https://github.com/darviarush/perl-aion"
}
},
"version" : "2.2",
"x_authority" : "cpan:DART",
"x_contributors" : [
"Iaroslav O. Kosmina <darviarush@mail.ru>",
"Iaroslav O. Kosmina <darviarush@ya.ru>",
"Yaroslav O. Kosmina <dart@cpan.org>"
],
"x_serialization_backend" : "JSON::PP version 4.16",
"x_static_install" : 0
}
i18n/Aion/Types.ru-en.po view on Meta::CPAN
msgid "Ð Ñ Ð½ÐµÐ³Ð¾ пеÑегÑÑÐ¶ÐµÐ½Ñ ÑказаннÑе опеÑаÑоÑÑ."
msgstr "And the specified operators are overloaded."
msgid "ÐлаÑÑ Ð¸Ð»Ð¸ обÑÐµÐºÑ Ð½Ð°ÑледÑÐµÑ ÐºÐ»Ð°ÑÑÑ Ð¸Ð· ÑпиÑка."
msgstr "A class or object inherits classes from a list."
msgid "ÐлаÑÑ Ð¸Ð»Ð¸ обÑÐµÐºÑ Ð¸Ð¼ÐµÐµÑ ÑказаннÑе Ñоли."
msgstr "A class or object has the specified roles."
msgid "ÐÑовеÑÑÐµÑ 1, 0, \"\", undef или обÑÐµÐºÑ Ñ Ð¿ÐµÑегÑÑженнÑм опеÑаÑоÑом `bool` или `0+` как `JSON::PP::Boolean`. Ðо вÑоÑом ÑлÑÑае вÑзÑÐ²Ð°ÐµÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ `0+` и пÑовеÑÑ...
msgstr "Tests for 1, 0, \"\", undef, or an object with an overloaded `bool` or `0+` operator as `JSON::PP::Boolean`. In the second case, it calls the `0+` operator and checks the result as `Bool`."
msgid "`BoolLike` вÑзÑÐ²Ð°ÐµÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ `0+` и пÑовеÑÑÐµÑ ÑезÑлÑÑаÑ."
msgstr "`BoolLike` calls the `0+` operator and checks the result."
msgid "СÑÑока или обÑÐµÐºÑ Ñ Ð¿ÐµÑегÑÑженнÑм опеÑаÑоÑом `\"\"`."
msgstr "A string or object overloaded with the `\"\"` operator."
msgid "РегÑлÑÑное вÑÑажение или обÑÐµÐºÑ Ñ Ð¿ÐµÑегÑÑженнÑм опеÑаÑоÑом `qr`."
msgstr "A regular expression or object with an overload of the `qr` operator."
lib/Aion/Types.md view on Meta::CPAN
'RoleExample' ~~ ConsumerOf[qw/Role1/] # -> 1
'RoleExample' ~~ ConsumerOf[qw/Role2 Role1/] # -> 1
bless({}, 'RoleExample') ~~ ConsumerOf[qw/Role3 Role2 Role1/] # -> ""
'NoneExample' ~~ ConsumerOf[qw/Role1/] # -> ""
```
## BoolLike
ÐÑовеÑÑÐµÑ 1, 0, "", undef или обÑÐµÐºÑ Ñ Ð¿ÐµÑегÑÑженнÑм опеÑаÑоÑом `bool` или `0+` как `JSON::PP::Boolean`. Ðо вÑоÑом ÑлÑÑае вÑзÑÐ²Ð°ÐµÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ `0+` и пÑовеÑÑÐµÑ Ñе...
`BoolLike` вÑзÑÐ²Ð°ÐµÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ `0+` и пÑовеÑÑÐµÑ ÑезÑлÑÑаÑ.
```perl
package BoolLikeExample {
use overload '0+' => sub { ${$_[0]} };
}
bless(\(my $x = 1 ), 'BoolLikeExample') ~~ BoolLike # -> 1
bless(\(my $x = 11), 'BoolLikeExample') ~~ BoolLike # -> ""
lib/Aion/Types.pm view on Meta::CPAN
package RoleExample { sub DOES { $_[1] ~~ [qw/Role1 Role2/] } }
'RoleExample' ~~ ConsumerOf[qw/Role1/] # -> 1
'RoleExample' ~~ ConsumerOf[qw/Role2 Role1/] # -> 1
bless({}, 'RoleExample') ~~ ConsumerOf[qw/Role3 Role2 Role1/] # -> ""
'NoneExample' ~~ ConsumerOf[qw/Role1/] # -> ""
=head2 BoolLike
Tests for 1, 0, "", undef, or an object with an overloaded C<bool> or C<0+> operator as C<JSON::PP::Boolean>. In the second case, it calls the C<0+> operator and checks the result as C<Bool>.
C<BoolLike> calls the C<0+> operator and checks the result.
package BoolLikeExample {
use overload '0+' => sub { ${$_[0]} };
}
bless(\(my $x = 1 ), 'BoolLikeExample') ~~ BoolLike # -> 1
bless(\(my $x = 11), 'BoolLikeExample') ~~ BoolLike # -> ""
t/aion/types.t view on Meta::CPAN
local ($::_g0 = do {'RoleExample' ~~ ConsumerOf[qw/Role1/]}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '\'RoleExample\' ~~ ConsumerOf[qw/Role1/] # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; unde...
local ($::_g0 = do {'RoleExample' ~~ ConsumerOf[qw/Role2 Role1/]}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '\'RoleExample\' ~~ ConsumerOf[qw/Role2 Role1/] # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef ...
local ($::_g0 = do {bless({}, 'RoleExample') ~~ ConsumerOf[qw/Role3 Role2 Role1/]}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, 'bless({}, \'RoleExample\') ~~ ConsumerOf[qw/Role3 Role2 Role1/] # -> ""' or ::diag ::...
local ($::_g0 = do {'NoneExample' ~~ ConsumerOf[qw/Role1/]}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '\'NoneExample\' ~~ ConsumerOf[qw/Role1/] # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; un...
#
# ## BoolLike
#
# ÐÑовеÑÑÐµÑ 1, 0, "", undef или обÑÐµÐºÑ Ñ Ð¿ÐµÑегÑÑженнÑм опеÑаÑоÑом `bool` или `0+` как `JSON::PP::Boolean`. Ðо вÑоÑом ÑлÑÑае вÑзÑÐ²Ð°ÐµÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ `0+` и пÑовеÑÑÐµÑ Ñ...
#
# `BoolLike` вÑзÑÐ²Ð°ÐµÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ `0+` и пÑовеÑÑÐµÑ ÑезÑлÑÑаÑ.
#
::done_testing; }; subtest 'BoolLike' => sub {
package BoolLikeExample {
use overload '0+' => sub { ${$_[0]} };
}
local ($::_g0 = do {bless(\(my $x = 1 ), 'BoolLikeExample') ~~ BoolLike}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, 'bless(\(my $x = 1 ), \'BoolLikeExample\') ~~ BoolLike # -> 1' or ::diag ::_struct_diff($::_g0, $...
local ($::_g0 = do {bless(\(my $x = 11), 'BoolLikeExample') ~~ BoolLike}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, 'bless(\(my $x = 11), \'BoolLikeExample\') ~~ BoolLike # -> ""' or ::diag ::_struct_diff($::_g0,...
( run in 0.468 second using v1.01-cache-2.11-cpan-d7f47b0818f )