view release on metacpan or search on metacpan
i18n/Aion/Types.ru-en.po view on Meta::CPAN
msgid "ÐпÑеделÑÐµÑ Ð·Ð½Ð°Ñение Ð´Ð»Ð¸Ð½Ñ Ð¾Ñ `A` до `B` или Ð¾Ñ 0 до `A`, еÑли `B` оÑÑÑÑÑÑвÑеÑ."
msgstr "Specifies a length value from `A` to `B`, or from 0 to `A` if `B` is missing."
msgid "Perl веÑÑии."
msgstr "Perl version."
msgid "СÑÑоки, вклÑÑÐ°Ñ ÑиÑла."
msgstr "Strings, including numbers."
msgid "СÑÑоки Unicode Ñ Ñлагом utf8 или еÑли декодиÑование в utf8 пÑоиÑÑ
Ð¾Ð´Ð¸Ñ Ð±ÐµÐ· оÑибок."
msgstr "Unicode strings with the utf8 flag or if decoding to utf8 occurs without errors."
msgid "ÐинаÑнÑе ÑÑÑоки без Ñлага utf8 и окÑеÑов Ñ Ð½Ð¾Ð¼ÐµÑами менÑÑе 128."
msgstr "Binary strings without the utf8 flag and octets with numbers less than 128."
msgid "СÑÑока наÑинаеÑÑÑ Ñ `S`."
msgstr "The line starts with `S`."
msgid "СÑÑока заканÑиваеÑÑÑ Ð½Ð° `S`."
msgstr "The line ends with `S`."
msgid "СÑÑока Ñ Ð¾Ð´Ð½Ð¸Ð¼ или неÑколÑкими Ñимволами, не ÑвлÑÑÑимиÑÑ Ð¿Ñобелами."
msgstr "A string containing one or more non-blank characters."
lib/Aion.pm view on Meta::CPAN
die $@ if $@;
}
goto &{"${cls}::new"};
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion - a postmodern object system for Perl 5, such as âMouseâ, âMooseâ, âMooâ, âMoâ and âMâ, but with improvements
=head1 VERSION
1.4
=head1 SYNOPSIS
lib/Aion/Meta/Feature.pm view on Meta::CPAN
sub compare {
my ($self, $other) = @_;
die "Types mismatch: $other->{isa} <=> $self->{isa}" if $self->{isa} && $self->{isa} ne $other->{isa};
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Meta::Feature - feature metadescriptor
=head1 SYNOPSIS
use Aion::Meta::Feature;
our $feature = Aion::Meta::Feature->new("My::Package", "my_feature" => (is => 'rw'));
lib/Aion/Meta/FeatureConstruct.pm view on Meta::CPAN
s{(^\t*)|;[\t ]*(\S)}{
if(defined $1) { $indent = $1 } else { ";\n$indent$2" }
}gme;
$_
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Meta::FeatureConstruct - accessor, predicate, initializer and clearer
=head1 SYNOPSIS
use Aion::Meta::FeatureConstruct;
our $construct = Aion::Meta::FeatureConstruct->new('My::Package', 'my_feature');
lib/Aion/Meta/RequiresAnyFunction.pm view on Meta::CPAN
sub stringify {
my ($self) = @_;
return "$self->{name} of $self->{pkg}";
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Meta::RequiresAnyFunction - defines any function that must be in the module
=head1 SYNOPSIS
use Aion::Meta::RequiresAnyFunction;
my $any_function = Aion::Meta::RequiresAnyFunction->new(
lib/Aion/Meta/RequiresFeature.pm view on Meta::CPAN
return "" if $value ne $other_value;
}
return 1;
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Meta::RequiresFeature - feature requirement for interfaces
=head1 SYNOPSIS
use Aion::Types qw(Str);
use Aion::Meta::RequiresFeature;
use Aion::Meta::Feature;
lib/Aion/Meta/Subroutine.pm view on Meta::CPAN
my ($pkg, $subname) = @$self{qw/pkg subname/};
my $signature = join " => ", @{$self->signature};
return "$subname($signature) of $pkg";
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Meta::Subroutine - describes a function with a signature
=head1 SYNOPSIS
use Aion::Types qw(Int);
use Aion::Meta::Subroutine;
lib/Aion/Meta/Util.pm view on Meta::CPAN
$v = substr($v, 0, MAX_SCALAR_LENGTH) . '...'
if length($v) > MAX_SCALAR_LENGTH;
$no_str ? $v : "'${\ $v =~ s/['\\]/\\$&/gr }'"
}
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Meta::Util - helper functions for creating meta data
=head1 SYNOPSIS
package My::Meta::Class {
use Aion::Meta::Util;
lib/Aion/Pleroma.pm view on Meta::CPAN
# Файл Ñ Ð°Ð½Ð½Ð¾ÑаÑиÑми
has ini => (is => 'ro', isa => Maybe[Str], default => INI);
# ÐонÑигÑÑаÑиÑ: клÑÑ => клаÑÑ#меÑод_клаÑÑа
has pleroma => (is => 'ro', isa => HashRef[Str], default => sub {
my ($self) = @_;
my %pleroma = %{&PLEROMA};
return \%pleroma unless defined $self->ini;
open my $f, '<:utf8', INI or die "Not open ${\$self->ini}: $!";
while(<$f>) {
close($f), die "${\$self->ini} corrupt at line $.: $_" unless /^([\w:]+)#(\w*),\d+=(.*)$/;
my ($pkg, $sub, $key) = ($1, $2, $3);
my $action = join "#", $pkg, $sub || 'new';
$key = $key ne ""? $key: ($sub? "$pkg#$sub": $pkg);
close($f), die "The eon $key is $pleroma{$key}, but added other $action" if exists $pleroma{$key};
$pleroma{$key} = $action;
lib/Aion/Pleroma.pm view on Meta::CPAN
sub resolve {
my ($self, $key) = @_;
$self->get($key) // die "$key is'nt eon!"
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Pleroma - container of aeons
=head1 SYNOPSIS
use Aion::Pleroma;
my $pleroma = Aion::Pleroma->new;
lib/Aion/Type.pm view on Meta::CPAN
eval $code or die;
$self
}
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Type - class of validators
=head1 SYNOPSIS
use Aion::Type;
my $Int = Aion::Type->new(name => "Int", test => sub { /^-?\d+$/ });
lib/Aion/Types.md view on Meta::CPAN
СÑÑоки, вклÑÑÐ°Ñ ÑиÑла.
```perl
1.1 ~~ Str # -> 1
"" ~~ Str # -> 1
1.1.0 ~~ Str # -> ""
```
## Uni
СÑÑоки Unicode Ñ Ñлагом utf8 или еÑли декодиÑование в utf8 пÑоиÑÑ
Ð¾Ð´Ð¸Ñ Ð±ÐµÐ· оÑибок.
```perl
"â" ~~ Uni # -> 1
123 ~~ Uni # -> ""
do {no utf8; "â" ~~ Uni} # -> 1
```
## Bin
ÐинаÑнÑе ÑÑÑоки без Ñлага utf8 и окÑеÑов Ñ Ð½Ð¾Ð¼ÐµÑами менÑÑе 128.
```perl
123 ~~ Bin # -> 1
"z" ~~ Bin # -> 1
"â" ~~ Bin # -> ""
do {no utf8; "â" ~~ Bin } # -> ""
```
## StartsWith\[S]
СÑÑока наÑинаеÑÑÑ Ñ `S`.
```perl
"Hi, world!" ~~ StartsWith["Hi,"] # -> 1
"Hi world!" ~~ StartsWith["Hi,"] # -> ""
```
lib/Aion/Types.pm view on Meta::CPAN
my $m = overload::Method($_, '0+');
Bool()->include($m ? $m->($_) : $_) };
subtype "Enum[A...]", as &Item, where { $_ ~~ ARGS };
subtype "Maybe[A]", as &Item, where { !defined($_) || A->test };
subtype "Undef", as &Item, where { !defined $_ };
subtype "Defined", as &Item, where { defined $_ };
subtype "Value", as &Defined, where { "" eq ref $_ };
subtype "Version", as &Value, where { "VSTRING" eq ref \$_ };
my $init_limit = sub { if(@{&ARGS} == 1) { SELF->{min} = 0; SELF->{max} = A } else { SELF->{min} = A; SELF->{max} = B } };
subtype "Str", as &Value, where { "SCALAR" eq ref \$_ };
subtype "Uni", as &Str, where { utf8::is_utf8($_) || /[\x80-\xFF]/a };
subtype "Bin", as &Str, where { !utf8::is_utf8($_) && !/[\x80-\xFF]/a };
subtype "NonEmptyStr", as &Str, where { /\S/ };
subtype "StartsWith[S]", as &Str,
init_where { M = qr/^${\ quotemeta A}/ },
where { $_ =~ M };
subtype "EndsWith[S]", as &Str,
init_where { N = qr/${\ quotemeta A}$/ },
where { $_ =~ N };
subtype "Email", as &Str, where { /@/ };
subtype "Tel", as &Str, where { /^\+\d{7,}\z/ };
subtype "Url", as &Str, where { /^https?:\/\// };
lib/Aion/Types.pm view on Meta::CPAN
coerce &Join, from &ArrayRef, via { join A, @$_ };
subtype 'Split[S]', as &ArrayRef, where { 1 };
coerce &Split, from &Str, via { [split A, $_] };
};
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Types - a library of standard validators and it is used to create new validators
=head1 SYNOPSIS
use Aion::Types;
BEGIN {
lib/Aion/Types.pm view on Meta::CPAN
=head2 Str
Strings, including numbers.
1.1 ~~ Str # -> 1
"" ~~ Str # -> 1
1.1.0 ~~ Str # -> ""
=head2 Uni
Unicode strings with the utf8 flag or if decoding to utf8 occurs without errors.
"â" ~~ Uni # -> 1
123 ~~ Uni # -> ""
do {no utf8; "â" ~~ Uni} # -> 1
=head2 Bin
Binary strings without the utf8 flag and octets with numbers less than 128.
123 ~~ Bin # -> 1
"z" ~~ Bin # -> 1
"â" ~~ Bin # -> ""
do {no utf8; "â" ~~ Bin } # -> ""
=head2 StartsWith[S]
The line starts with C<S>.
"Hi, world!" ~~ StartsWith["Hi,"] # -> 1
"Hi world!" ~~ StartsWith["Hi,"] # -> ""
=head2 EndsWith[S]
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion - поÑÑмодеÑниÑÑÑÐºÐ°Ñ Ð¾Ð±ÑекÑÐ½Ð°Ñ ÑиÑÑема Ð´Ð»Ñ Perl 5, ÑÐ°ÐºÐ°Ñ ÐºÐ°Ðº «Mouse», «Moose», «Moo», «Mo» и «M», но Ñ ÑлÑÑÑениÑми
#
# # VERSION
#
# 1.3
#
# # SYNOPSIS
#
t/aion/meta/feature-construct.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Meta::FeatureConstruct - конÑÑÑÑкÑÐ¾Ñ Ð°ÐºÑеÑÑоÑа, пÑедикаÑа, иниÑиализаÑоÑа и оÑиÑÑиÑелÑ
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Meta::FeatureConstruct;
our $construct = Aion::Meta::FeatureConstruct->new('My::Package', 'my_feature');
t/aion/meta/feature.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Meta::Feature - меÑаопиÑаÑÐµÐ»Ñ ÑиÑи
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Meta::Feature;
our $feature = Aion::Meta::Feature->new("My::Package", "my_feature" => (is => 'rw'));
t/aion/meta/requires-any-function.pm view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; BEGIN { $SIG{__DIE__} = sub ...
#
# use common::sense;
#
# use Aion::Meta::Util qw//;
#
# Aion::Meta::Util::create_getters(qw/pkg name/);
#
# sub new {
# my $cls = shift;
# bless {@_}, ref $cls || $cls;
t/aion/meta/requires-any-function.pm view on Meta::CPAN
# sub compare {
# my ($self, $other) = @_;
#
# die "$self->{name} requires!" unless ref $other eq 'CODE';
# }
#
# 1;
#
# __END__
#
# =encoding utf-8
#
# =head1 NAME
#
# Aion::Meta::RequiresAnyFunction - defines any function that must be in the module
#
# =head1 SYNOPSIS
#
# use Aion::Meta::RequiresAnyFunction;
#
# my $any_function = Aion::Meta::RequiresAnyFunction->new(
t/aion/meta/requires-any-function.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Meta::RequiresAnyFunction - опÑеделÑÐµÑ Ð»ÑбÑÑ ÑÑнкÑиÑ, коÑоÑÐ°Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° бÑÑÑ Ð² модÑле
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Meta::RequiresAnyFunction;
my $any_function = Aion::Meta::RequiresAnyFunction->new(
t/aion/meta/requires-feature.pm view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; BEGIN { $SIG{__DIE__} = sub ...
#
# use common::sense;
#
# use Aion::Meta::Util qw//;
# use List::Util qw/pairmap/;
# use Scalar::Util qw/looks_like_number reftype blessed refaddr/;
#
# Aion::Meta::Util::create_getters(qw/pkg name opt has/);
#
# # ÐонÑÑÑÑкÑоÑ
t/aion/meta/requires-feature.pm view on Meta::CPAN
# return "" if $value ne $other_value;
# }
#
# return 1;
# }
#
# 1;
#
# __END__
#
# =encoding utf-8
#
# =head1 NAME
#
# Aion::Meta::RequiresFeature - ÑÑебование ÑиÑи Ð´Ð»Ñ Ð¸Ð½ÑеÑÑейÑов
#
# =head1 SYNOPSIS
#
# use Aion::Types qw(Str);
# use Aion::Meta::RequiresFeature;
# use Aion::Meta::Feature;
t/aion/meta/requires-feature.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Meta::RequiresFeature - ÑÑебование ÑиÑи Ð´Ð»Ñ Ð¸Ð½ÑеÑÑейÑов
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Types qw(Str);
use Aion::Meta::RequiresFeature;
use Aion::Meta::Feature;
t/aion/meta/subroutine.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Meta::Subroutine - опиÑÑÐ²Ð°ÐµÑ ÑÑнкÑÐ¸Ñ Ñ ÑигнаÑÑÑой
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Types qw(Int);
use Aion::Meta::Subroutine;
t/aion/meta/util.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Meta::Util - вÑпомогаÑелÑнÑе ÑÑнкÑии Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¼ÐµÑа-даннÑÑ
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
package My::Meta::Class {
use Aion::Meta::Util;
t/aion/pleroma.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Pleroma - конÑÐµÐ¹Ð½ÐµÑ Ñонов
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Pleroma;
my $pleroma = Aion::Pleroma->new;
t/aion/type.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Type - клаÑÑ Ð²Ð°Ð»Ð¸Ð´Ð°ÑоÑов
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Type;
my $Int = Aion::Type->new(name => "Int", test => sub { /^-?\d+$/ });
t/aion/types.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Types - библиоÑека ÑÑандаÑÑнÑÑ
валидаÑоÑов и ÑлÑÐ¶Ð¸Ñ Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð½Ð¾Ð²ÑÑ
валидаÑоÑов
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Types;
BEGIN {
t/aion/types.t view on Meta::CPAN
# СÑÑоки, вклÑÑÐ°Ñ ÑиÑла.
#
::done_testing; }; subtest 'Str' => sub {
local ($::_g0 = do {1.1 ~~ Str}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '1.1 ~~ Str # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {"" ~~ Str}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '"" ~~ Str # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {1.1.0 ~~ Str}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '1.1.0 ~~ Str # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
#
# ## Uni
#
# СÑÑоки Unicode Ñ Ñлагом utf8 или еÑли декодиÑование в utf8 пÑоиÑÑ
Ð¾Ð´Ð¸Ñ Ð±ÐµÐ· оÑибок.
#
::done_testing; }; subtest 'Uni' => sub {
local ($::_g0 = do {"â" ~~ Uni}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '"â" ~~ Uni # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {123 ~~ Uni}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '123 ~~ Uni # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {do {no utf8; "â" ~~ Uni}}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, 'do {no utf8; "â" ~~ Uni} # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
#
# ## Bin
#
# ÐинаÑнÑе ÑÑÑоки без Ñлага utf8 и окÑеÑов Ñ Ð½Ð¾Ð¼ÐµÑами менÑÑе 128.
#
::done_testing; }; subtest 'Bin' => sub {
local ($::_g0 = do {123 ~~ Bin}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '123 ~~ Bin # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {"z" ~~ Bin}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '"z" ~~ Bin # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {"â" ~~ Bin}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '"â" ~~ Bin # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {do {no utf8; "â" ~~ Bin }}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, 'do {no utf8; "â" ~~ Bin } # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
#
# ## StartsWith\[S]
#
# СÑÑока наÑинаеÑÑÑ Ñ `S`.
#
::done_testing; }; subtest 'StartsWith\[S]' => sub {
local ($::_g0 = do {"Hi, world!" ~~ StartsWith["Hi,"]}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '"Hi, world!" ~~ StartsWith["Hi,"] # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {"Hi world!" ~~ StartsWith["Hi,"]}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '"Hi world!" ~~ StartsWith["Hi,"] # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;