Acme-Types-NonStandard
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
The number 42. Always.
Can be coerced from Any (to the number 42).
### ProbableMemoryLeak
An object that contains cyclic references (per [Devel::Cycle](https://metacpan.org/pod/Devel::Cycle)).
### ReallySparseArray
An array that only contains `undef` (but as many of them as you'd like!)
### RefRefRef
A reference to a reference to a reference (to ensure adequate levels of
indirection; see also: Cargill's quandry).
# AUTHOR
Jon Portnoy <avenj@cobaltirc.org>, but I'm going to loudly deny while pointing
fingers at `popl` and `hobbs` on `irc.perl.org#moose`.
lib/Acme/Types/NonStandard.pm view on Meta::CPAN
The number 42. Always.
Can be coerced from Any (to the number 42).
=head3 ProbableMemoryLeak
An object that contains cyclic references (per L<Devel::Cycle>).
=head3 ReallySparseArray
An array that only contains C<undef> (but as many of them as you'd like!)
=head3 RefRefRef
A reference to a reference to a reference (to ensure adequate levels of
indirection; see also: Cargill's quandry).
=head1 AUTHOR
Jon Portnoy <avenj@cobaltirc.org>, but I'm going to loudly deny while pointing
fingers at C<popl> and C<hobbs> on C<irc.perl.org#moose>.
t/00-report-prereqs.t view on Meta::CPAN
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.020
use Test::More tests => 1;
use ExtUtils::MakeMaker;
use File::Spec;
# from $version::LAX
my $lax_version_re =
qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )?
|
(?:\.[0-9]+) (?:_[0-9]+)?
) | (?:
v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )?
|
(?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)?
)
)/x;
# hide optional CPAN::Meta modules from prereq scanner
t/00-report-prereqs.t view on Meta::CPAN
for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) {
next if $mod eq 'perl';
next if grep { $_ eq $mod } @exclude;
my $file = $mod;
$file =~ s{::}{/}g;
$file .= ".pm";
my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;
my $want = $req_hash->{$phase}{$type}{$mod};
$want = "undef" unless defined $want;
$want = "any" if !$want && $want == 0;
my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required";
if ($prefix) {
my $have = MM->parse_version( File::Spec->catfile($prefix, $file) );
$have = "undef" unless defined $have;
push @reports, [$mod, $want, $have];
if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) {
if ( $have !~ /\A$lax_version_re\z/ ) {
push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)";
}
elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) {
push @dep_errors, "$mod version '$have' is not in required range '$want'";
}
}
my $orig = 'foo';
my $r = \$orig;
my $rr = \$r;
my $rrr = \$rr;
should_pass $rrr, RefRefRef;
should_fail $rr, RefRefRef;
should_fail $r, RefRefRef;
should_fail $orig, RefRefRef;
should_pass [undef,undef], ReallySparseArray;
should_fail [undef, 1], ReallySparseArray;
my $h = +{ foo => [ 'bar' ], baz => 'quux' };
$h->{foo}->[1] = $h->{foo};
should_pass $h, ProbableMemoryLeak;
should_fail +{ foo => 'bar' }, ProbableMemoryLeak;
done_testing
( run in 2.587 seconds using v1.01-cache-2.11-cpan-d80b1682f3f )