Plack-App-MCCS

 view release on metacpan or  search on metacpan

local/lib/perl5/Eval/TypeTiny.pm  view on Meta::CPAN

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
sub IMPLEMENTATION_PADWALKER ()      { 'PadWalker' }
sub IMPLEMENTATION_TIE ()            { 'tie' }
sub IMPLEMENTATION_NATIVE ()         { 'perl' }
 
my $implementation;
 
#<<<
# uncoverable subroutine
sub ALIAS_IMPLEMENTATION () {
        $implementation ||= _pick_alternative(
                if    => ( $] ge '5.022' ) => IMPLEMENTATION_NATIVE,
                needs => 'Devel::LexAlias' => IMPLEMENTATION_DEVEL_LEXALIAS,
                needs => 'PadWalker'       => IMPLEMENTATION_PADWALKER,
                if    => !!1               => IMPLEMENTATION_TIE,
        );
}
#>>>
 
sub _force_implementation {
        $implementation = shift;
}

local/lib/perl5/Exporter/Tiny.pm  view on Meta::CPAN

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use 5.006001;
use strict;
use warnings; no warnings qw(void once uninitialized numeric redefine);
 
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION   = '1.006002';
our @EXPORT_OK = qw< mkopt mkopt_hash _croak _carp >;
 
BEGIN {
        *_HAS_NATIVE_LEXICAL_SUB = ( $] ge '5.037002' )
                ? sub () { !!1 }
                : sub () { !!0 };
        *_HAS_MODULE_LEXICAL_SUB = ( $] ge '5.011002' and eval('require Lexical::Sub') )
                ? sub () { !!1 }
                : sub () { !!0 };
};
 
sub _croak ($;@) { require Carp; my $fmt = shift; @_ = sprintf($fmt, @_); goto \&Carp::croak }
sub _carp  ($;@) { require Carp; my $fmt = shift; @_ = sprintf($fmt, @_); goto \&Carp::carp }
 
my $_process_optlist = sub
{
        my $class = shift;

local/lib/perl5/Exporter/Tiny.pm  view on Meta::CPAN

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
                $class->_exporter_uninstall_sub($_, $wanted->[1], $global_opts)
                        for keys %symbols;
        }
}
 
# Returns a coderef suitable to be used as a sub installer for lexical imports.
#
sub _exporter_lexical_installer {
        _HAS_NATIVE_LEXICAL_SUB and return sub {
                my ( $sigilname, $sym ) = @{ $_[1] };
                no warnings ( $] ge '5.037002' ? 'experimental::builtin' : () );
                builtin::export_lexically( $sigilname, $sym );
        };
        _HAS_MODULE_LEXICAL_SUB and return sub {
                my ( $sigilname, $sym ) = @{ $_[1] };
                ( $sigilname =~ /^\w/ )
                        ? 'Lexical::Sub'->import( $sigilname, $sym )
                        : 'Lexical::Var'->import( $sigilname, $sym );
        };
        _croak( 'Lexical export requires Perl 5.37.2+ for native support, or Perl 5.11.2+ with the Lexical::Sub module' );
}

local/lib/perl5/Type/Tiny/Enum.pm  view on Meta::CPAN

327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
sub closest_match {
        require Types::Standard;
         
        my ( $self, $given ) = ( shift, @_ );
         
        return unless Types::Standard::is_Str $given;
         
        return $given if $self->check( $given );
         
        $canon ||= eval(
                $] lt '5.016'
                ? q< sub { ( my $var = lc($_[0]) ) =~ s/(^\s+)|(\s+$)//g; $var } >
                : q< sub { CORE::fc($_[0]) =~ s/(^\s+)|(\s+$)//gr; } >
        );
         
        $self->{_lookups} ||= do {
                my %lookups;
                for ( @{ $self->values } ) {
                        my $key = $canon->( $_ );
                        next if exists $lookups{$key};
                        $lookups{$key} = $_;

local/lib/perl5/Types/TypeTiny.pm  view on Meta::CPAN

389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
                );
                _reinstall_subs $cache{ArrayLike};
        } #/ if ( __XS )
        else {
                $cache{ArrayLike} = "Type::Tiny"->new( %common );
        }
         
        @_ ? $cache{ArrayLike}->parameterize( @{ $_[0] } ) : $cache{ArrayLike};
} #/ sub ArrayLike (;@)
 
if ( $] ge '5.014' ) {
        &Scalar::Util::set_prototype( $_, ';$' ) for \&HashLike, \&ArrayLike;
}
 
sub CodeLike () {
        return $cache{CodeLike} if $cache{CodeLike};
        require Type::Tiny;
        my %common = (
                name       => "CodeLike",
                constraint => sub {
                        ref( $_ ) eq q[CODE]



( run in 0.357 second using v1.01-cache-2.11-cpan-e5176c747c2 )