view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
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]+)? )?
|
t/00-report-prereqs.t view on Meta::CPAN
$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)";
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $class->_error( "File '$file' does not exist" ) unless -e $file;
return $class->_error( "'$file' is a directory, not a file" ) unless -f _;
return $class->_error( "Insufficient permissions to read '$file'" ) unless -r _;
# Slurp in the file
local $/ = undef;
local *CFG;
unless ( open(CFG, $file) ) {
return $class->_error("Failed to open file '$file': $!");
}
my $contents = <CFG>;
t/000-report-versions.t view on Meta::CPAN
# Do we have a document header?
if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) {
# Handle scalar documents
shift @lines;
if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) {
push @$self, $self->_read_scalar( "$1", [ undef ], \@lines );
next;
}
}
if ( ! @lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) {
# A naked document
push @$self, undef;
while ( @lines and $lines[0] !~ /^---/ ) {
shift @lines;
}
} elsif ( $lines[0] =~ /^\s*\-/ ) {
t/000-report-versions.t view on Meta::CPAN
my ($self, $string, $indent, $lines) = @_;
# Trim trailing whitespace
$string =~ s/\s*\z//;
# Explitic null/undef
return undef if $string eq '~';
# Quotes
if ( $string =~ /^\'(.*?)\'\z/ ) {
return '' unless defined $1;
$string = $1;
t/000-report-versions.t view on Meta::CPAN
$self->_read_hash( $array->[-1], [ @$indent, $indent2 ], $lines );
} elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) {
# Array entry with a value
shift @$lines;
push @$array, $self->_read_scalar( "$2", [ @$indent, undef ], $lines );
} elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) {
shift @$lines;
unless ( @$lines ) {
push @$array, undef;
return 1;
}
if ( $lines->[0] =~ /^(\s*)\-/ ) {
my $indent2 = length("$1");
if ( $indent->[-1] == $indent2 ) {
# Null array entry
push @$array, undef;
} else {
# Naked indenter
push @$array, [ ];
$self->_read_array( $array->[-1], [ @$indent, $indent2 ], $lines );
}
t/000-report-versions.t view on Meta::CPAN
my $key = $1;
# Do we have a value?
if ( length $lines->[0] ) {
# Yes
$hash->{$key} = $self->_read_scalar( shift(@$lines), [ @$indent, undef ], $lines );
} else {
# An indent
shift @$lines;
unless ( @$lines ) {
$hash->{$key} = undef;
return 1;
}
if ( $lines->[0] =~ /^(\s*)-/ ) {
$hash->{$key} = [];
$self->_read_array( $hash->{$key}, [ @$indent, length($1) ], $lines );
} elsif ( $lines->[0] =~ /^(\s*)./ ) {
my $indent2 = length("$1");
if ( $indent->[-1] >= $indent2 ) {
# Null hash entry
$hash->{$key} = undef;
} else {
$hash->{$key} = {};
$self->_read_hash( $hash->{$key}, [ @$indent, length($1) ], $lines );
}
}
t/000-report-versions.t view on Meta::CPAN
}
# Set error
sub _error {
$YAML::Tiny::errstr = $_[1];
undef;
}
# Retrieve error
sub errstr {
$YAML::Tiny::errstr;
t/000-report-versions.t view on Meta::CPAN
};
if ( $@ ) {
# Failed to load Scalar::Util
eval <<'END_PERL';
sub refaddr {
my $pkg = ref($_[0]) or return undef;
if (!!UNIVERSAL::can($_[0], 'can')) {
bless $_[0], 'Scalar::Util::Fake';
} else {
$pkg = undef;
}
"$_[0]" =~ /0x(\w+)/;
my $i = do { local $^W; hex $1 };
bless $_[0], $pkg if defined $pkg;
$i;
t/000-report-versions.t view on Meta::CPAN
next;
}
local $SIG{__WARN__} = sub { note "$module: $_[0]" };
require_ok $module or BAIL_OUT("can't load $module");
my $version = $module->VERSION;
$version = 'undefined' unless defined $version;
diag(" $module version is $version");
}
done_testing;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
{
print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
}
else
{
# no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
print "too old. ($cur < $arg)\n";
}
push @required, $mod => $arg;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
$file =~ s|::|/|g;
$file .= '.pm';
local $@;
return eval { require $file; $mod->VERSION } || ( $@ ? undef: 0 );
}
# Load CPAN.pm and it's configuration
sub _load_cpan {
return if $CPAN::VERSION and $CPAN::Config and not @_;
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
use Module::Metadata;
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]+)? )?
|
t/00-report-prereqs.t view on Meta::CPAN
$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 = Module::Metadata->new_from_file( File::Spec->catfile($prefix, $file) )->version;
$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)";
view all matches for this distribution
view release on metacpan or search on metacpan
script/cpan-author.pl view on Meta::CPAN
unlink FILE if -e FILE && time - [stat(FILE)]->[9] > EXP;
if (my $data = eval { local $/; open my $fh, '<', FILE or die $!; <$fh> }) {
warn 'cache';
$_->request(HTTP::Request->new('GET', shift)), return $_ for HTTP::Response->new(200, 'OK', undef, $data);
}
for ($self->SUPER::get(@_)) {
open my $fh, '>', FILE or die $!;
print $fh $_->content;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
$VERSION = '1.21';
# Storage for the pseudo-singleton
$MAIN = undef;
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
}
inc/Module/Install.pm view on Meta::CPAN
defined $_[0]
and
! ref $_[0]
and
$_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s
) ? $_[0] : undef;
}
1;
# Copyright 2008 - 2012 Adam Kennedy.
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
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]+)? )?
|
t/00-report-prereqs.t view on Meta::CPAN
$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)";
view all matches for this distribution
view release on metacpan or search on metacpan
t/10-base.t view on Meta::CPAN
my $count = $authors->count;
diag "$count authors found";
cmp_ok $count, '>', 0, 'there are some authors';
is $authors->name('???'), undef, 'wrong name';
is $authors->name('VPIT'), 'Vincent Pit', 'we should at least have this module';
isnt $authors->name('ISHIGAKI'), undef, 'we should at least have Acme::CPANAuthors\' author';
isnt $authors->name('GAAS'), undef, 'we should at least have LWP\'s author';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/COLOR.pm view on Meta::CPAN
description => <<'_',
The NO_COLOR convention (see https://no-color.org) lets user disable color
output of console programs by defining an environment variable called NO_COLOR.
The existence of said environment variable, regardless of its value (including
empty string, undef, or 0), signals that programs should not use colored output.
Another similar convention is the use of the COLOR environment variable. False
value (empty string or the value 0) means that programs should disable colored
output, while true value (values other than the mentioned false values) means
that programs should enable colored output. This convention allows
lib/Acme/CPANModules/COLOR.pm view on Meta::CPAN
=head1 DESCRIPTION
The NO_COLOR convention (see https://no-color.org) lets user disable color
output of console programs by defining an environment variable called NO_COLOR.
The existence of said environment variable, regardless of its value (including
empty string, undef, or 0), signals that programs should not use colored output.
Another similar convention is the use of the COLOR environment variable. False
value (empty string or the value 0) means that programs should disable colored
output, while true value (values other than the mentioned false values) means
that programs should enable colored output. This convention allows
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/CalculatingDayOfWeek.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::CalculatingDayOfWeek;
our $VERSION = 0.002; # VERSION
our $results = [[200,"OK",[{_name=>"participant=DateTime",_succinct_name=>"D",errors=>3.8e-08,participant=>"DateTime",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>80.570996978852,rate=>37000,samples=>24,time=>27},{_name=>"participant=Date::DayOfWe...
1;
# ABSTRACT: List of modules to calculate day of week
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/HTMLTable.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::HTMLTable;
our $VERSION = 0.002; # VERSION
our $results = do{my$var=[[200,"OK",[{_name=>"participant=Text::Table::Manifold",_succinct_name=>"TT:M",errors=>4.9e-05,participant=>"Text::Table::Manifold",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>6.36903376018626,rate=>15.8,samples=>21,time=...
1;
# ABSTRACT: List of modules that generate HTML tables
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/CPANRatings/User/davidgaramond.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-davidgaramond'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\nOk, it's not 2004 anymore, I suggest we retire or start to deprecate this module? This module now requires Perl 5....
1;
# ABSTRACT: List of modules mentioned by CPANRatings user davidgaramond
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/CPANRatings/User/perlancar.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-perlancar'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\nI'm not sure this really "befits a ::Tiny distribution" just because it's a thin wrapper of something. P...
1;
# ABSTRACT: List of modules mentioned by CPANRatings user perlancar
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-stevenharyanto'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\n(REMOVED)\n",module=>"Log::Any",rating=>undef},{description=>"\nProvides a thin/lightweight OO interface for \$?, ...
1;
# ABSTRACT: List of modules mentioned by CPANRatings user stevenharyanto
__END__
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
Author: L<LAWALSH|https://metacpan.org/author/LAWALSH>
I personally don't mind the namespace choice. There are other single-letter CPAN modules too like B, L, U, V. If you have a beef with regard to namespace, don't single out P and perhaps downvote the other modules too.
<br><br>Having said that, I would like to comment on the design and implementation of this module.
<br><br>1) The choice of Unicode character U+2204 as representation of undef. Unless one does something like 'binmode STDOUT, ":utf8"', with 'say P undef' I am just trading one warning ("Use of uninitialized value") with another (...
<br><br>2) P loads utf8 by default. For ultra-lightweight cases, this is sometimes not desirable. There is currently no way to turn this off.
<br><br>3) The arbitrary choice of three levels deep when printing references. This can be customized but with an unusual syntax. But again, the arbitrary choice of three.
<br><br>4) The "complex" rules of newline printing. p() is like puts, it can optionally add a newline. But unlike puts, the doc says it can also remove newlines. The behavior can also change if the string to be printed ends with 0x83.
<br><br>I might use P for a sprintf/printf replacement, but for debugging values, I'd prefer something "dumber" like Data::Dump::Color (or Data::Printer, if that's your thing).
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
Works for me too ATM. I've tried several command-line scripts (most of them Python-based, like youtube-dl, tubenick, etc). Sometimes they work, sometimes they broke. It's the nature of this kind of script. The quality comes from persistence. This mod...
=item L<Number::Zero>
From the module's POD: "The number zero and undef are difficult to determine in Perl."
<br><br>Are they?
<br><br>say !defined($data) ? "undef" : "not undef";
<br><br>say defined($data) && $data==0 ? "zero" : "not zero"; # yes, warn if non-numeric
<br><br>use Scalar::Util 'looks_like_number';
<br>
say looks_like_number($data) && $data==0 ? "zero" : "not zero";
<br><br>Though I understand the need for a convenient "is_zero" function if you need to test for zero in a program a lot.
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
=item L<PerlX::Maybe>
Author: L<TOBYINK|https://metacpan.org/author/TOBYINK>
A nice syntax addition for avoiding passing or writing a bunch of undefs. More convenient to write than using ternary operator or grep. I'm beginning to adore syntax modules like this (as long as it adds negligible overhead).
<br><br>
=item L<File::Path::Tiny>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/JSONVariants.pm view on Meta::CPAN
6) **RJSON**. <https://relaxedjson.org/>. Relaxed JSON. Trailing commas,
Optional commas, comments (C-style and C++-style), single-quoted &
backtick-quoted strings as well as bare/unquoted, hash key without value (value
will default to `undef`). It touts itself as "going beyond other JSON variants,
including JSON5."
Perl modules: <pm:JSON::Relaxed>.
lib/Acme/CPANModules/JSONVariants.pm view on Meta::CPAN
Perl modules: (none so far).
6) B<RJSON>. L<https://relaxedjson.org/>. Relaxed JSON. Trailing commas,
Optional commas, comments (C-style and C++-style), single-quoted &
backtick-quoted strings as well as bare/unquoted, hash key without value (value
will default to C<undef>). It touts itself as "going beyond other JSON variants,
including JSON5."
Perl modules: L<JSON::Relaxed>.
7) B<< L<JSON::Diffable> >>. Basically just allowing for trailing commas.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/ModuleAutoloaders.pm view on Meta::CPAN
summary => 'List of modules that autoload other modules',
description => <<'_',
"Module autoloader" modules work using Perl's autoloading mechanism (read
`perlsub` for more details). By declaring a subroutine named `AUTOLOAD` in the
`UNIVERSAL` package, you setup a fallback mechanism when you call an undefined
subroutine. The module autoloader's's AUTOLOADER loads the module using e.g.
<pm:Module::Load> or plain `require()` then try to invoke the undefined
subroutine once again.
These modules are usually convenient for one-liner usage.
_
lib/Acme/CPANModules/ModuleAutoloaders.pm view on Meta::CPAN
=head1 DESCRIPTION
"Module autoloader" modules work using Perl's autoloading mechanism (read
C<perlsub> for more details). By declaring a subroutine named C<AUTOLOAD> in the
C<UNIVERSAL> package, you setup a fallback mechanism when you call an undefined
subroutine. The module autoloader's's AUTOLOADER loads the module using e.g.
L<Module::Load> or plain C<require()> then try to invoke the undefined
subroutine once again.
These modules are usually convenient for one-liner usage.
=head1 ACME::CPANMODULES ENTRIES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/NewDistributions/202001.pm view on Meta::CPAN
summary => "Use HarfBuzz for text shaping",
},
{
description => "Distribution Huawei-Info-Ipaddr first released by PINGAN at 2020-01-08T15:01:58Z.",
module => "Huawei::Info::Ipaddr",
summary => undef,
},
{
description => "Distribution IO-EPP first released by VADIML at 2020-01-12T12:01:15Z.",
module => "IO::EPP",
summary => "Object and procedure interface of the client-side for work with EPP API of registries and some resellers",
lib/Acme/CPANModules/NewDistributions/202001.pm view on Meta::CPAN
summary => "express yourself through moo",
},
{
description => "Distribution MooseX-Function-Parameters first released by ROBFARR at 2020-01-03T19:49:47Z.",
module => "MooseX::Function::Parameters",
summary => undef,
},
{
description => "Distribution Net-MyIP first released by RAJ at 2020-01-24T10:48:45Z.",
module => "Net::MyIP",
summary => "Get ip address from https://api.myip.com/",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/OneLinerTools.pm view on Meta::CPAN
% perl -ML -E'$doc = Org::Parser::Tiny->new->parse_file("/home/budi/todo.org"); ...'
"Module autoloader" modules work using Perl's autoloading mechanism (read
`perlsub` for more details). By declaring a subroutine named `AUTOLOAD` in the
`UNIVERSAL` package, you setup a fallback mechanism when you call an undefined
subroutine. <pm:L>'s AUTOLOADER loads the module using <pm:Module::Load> then
try to invoke the undefined subroutine once again.
MARKDOWN
tags => ['module-loading'],
},
lib/Acme/CPANModules/OneLinerTools.pm view on Meta::CPAN
% perl -ML -E'$doc = Org::Parser::Tiny->new->parse_file("/home/budi/todo.org"); ...'
"Module autoloader" modules work using Perl's autoloading mechanism (read
C<perlsub> for more details). By declaring a subroutine named C<AUTOLOAD> in the
C<UNIVERSAL> package, you setup a fallback mechanism when you call an undefined
subroutine. L<L>'s AUTOLOADER loads the module using L<Module::Load> then
try to invoke the undefined subroutine once again.
=item L<lib::xi>
Author: L<GFUJI|https://metacpan.org/author/GFUJI>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/OrderedHash.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::OrderedHash;
our $VERSION = 0.004; # VERSION
our $results = do{my$var=[[200,"OK",[{_name=>"participant=Tie::StoredOrderHash",_succinct_name=>"T:S",errors=>1.4e-06,participant=>"Tie::StoredOrderHash",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>5.16666666666667,rate=>539,samples=>22,time=>1.8...
1;
# ABSTRACT: List of modules that provide ordered hash data type
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/PERLANCAR/Dummy.pm view on Meta::CPAN
},
entries => [
{
module => "App::Trrr",
features => {
foo => {value=>undef, summary=>'Some note'},
bar => {value=>undef, summary=>'Some note'},
baz => 'value1',
},
},
{
module => "App::Wax",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/PortedFrom/Python.pm view on Meta::CPAN
python_package => 'argparse',
tags => ['cli'],
},
{
module => 'PSGI',
python_package => undef,
python_url => 'https://www.python.org/dev/peps/pep-3333/',
tags => ['web'],
description => <<'_',
From Plack's documentation: "Plack is like Ruby's Rack or Python's Paste for
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/PortedFrom/Ruby.pm view on Meta::CPAN
_
entries => [
{
module => 'App::Sass',
tags => ['web'],
#ruby_package => undef,
},
{
module => 'Data::Gimei',
ruby_package => 'gimei',
tags => [],
},
{
module => 'Scientist',
#tags => [],
#ruby_package => undef,
},
{
module => 'HTTP::Server::Brick',
tags => ['web'],
#ruby_package => undef,
},
{
module => 'Plack',
tags => ['web', 'framework'],
description => <<'_',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
bench_code => sub {
my ($table) = @_;
Text::Table::Any::table(rows=>$table, header_row=>1);
},
features => {
align_cell => {value=>undef, summary=>"Depends on backend"},
align_column => {value=>undef, summary=>"Depends on backend"},
align_row => {value=>undef, summary=>"Depends on backend"},
box_char => {value=>undef, summary=>"Depends on backend"},
color_data => {value=>undef, summary=>"Depends on backend"},
color_theme => {value=>undef, summary=>"Depends on backend"},
colspan => {value=>undef, summary=>"Depends on backend"},
custom_border => {value=>undef, summary=>"Depends on backend"},
custom_color => {value=>undef, summary=>"Depends on backend"},
multiline_data => {value=>undef, summary=>"Depends on backend"},
rowspan => {value=>undef, summary=>"Depends on backend"},
speed => {value=>undef, summary=>"Depends on backend"},
valign_cell => {value=>undef, summary=>"Depends on backend"},
valign_column => {value=>undef, summary=>"Depends on backend"},
valign_row => {value=>undef, summary=>"Depends on backend"},
wide_char_data => {value=>undef, summary=>"Depends on backend"},
},
},
{
module => 'Text::SimpleTable',
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
join("\n", @{$t->render(padding => 1)}) . "\n";
},
features => {
align_cell => 0,
align_column => 1,
box_char => undef, # ?
color_data => 1,
color_theme => 0,
colspan => 0,
custom_border => {value=>0, summary=>"But this module can pass rendering to other module like Text::UnicodeBox::Table"},
custom_color => 0,
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
$t;
},
features => {
wide_char_data => 0,
color_data => 0,
box_char => {value=>undef, summary=>'Does not draw borders'},
multiline_data => 1,
},
},
{
module => 'Text::Table::Tiny',
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
Text::Table::CSV::table(rows=>$table, header_row=>1);
},
features => {
wide_char_data => 1,
color_data => 0,
box_char => {value=>undef, summary=>"Irrelevant"},
multiline_data => {value=>1, summary=>"But make sure your CSV parser can handle multiline cell"},
},
},
{
module => 'Text::Table::HTML',
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
$t->render; # doesn't add newline
},
features => {
wide_char_data => 1,
color_data => 0,
box_char => {value=>undef, summary=>"Irrelevant"},
multiline_data => 1,
},
},
],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/UUID.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::UUID;
our $VERSION = 0.011; # VERSION
our $results = [[200,"OK",[{_name=>"participant=UUID::Random::Secure::generate",_succinct_name=>"URS:g",errors=>0.0013,participant=>"UUID::Random::Secure::generate",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>36.5,rate=>30,samples=>22,time=>30},{...
1;
# ABSTRACT: List of modules that can generate immutable universally unique identifier (UUIDs)
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/https_mojolicious.io_blog_2017_12_07_day-7-using-template-variants-for-a-beta-landing-page view on Meta::CPAN
trick: I created a new template called <code>web.html+beta.ep</code> that imports
the original template and unsets the <code>variant</code> stash variable. Now
I can see the <a href="http://beta.cpantesters.org/web">main index page on the beta site at
http://beta.cpantesters.org/web</a>.</p>
<pre><code class="hljs">%= include 'index', variant => undef
</code></pre>
<pre><code>$ perl myapp.pl get /web -m beta
<h1>CPAN Testers</h1>
<p>This is the main CPAN Testers application.</p>
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/https_mojolicious.io_blog_2018_12_04_testing-hooks-and-helpers_ view on Meta::CPAN
tokens => { }, # token => username
},
};
helper current_user => sub( $c ) {
my $auth = $c->req->headers->authorization;
return undef unless $auth;
my ( $token ) = $auth =~ /^Token\ (\S+)$/;
return undef unless $token;
return $c->app->config->{tokens}{ $token };
};
</code></pre>
<p>Then, rather than generating web requests to check all our
devdata/https_mojolicious.io_blog_2018_12_04_testing-hooks-and-helpers_ view on Meta::CPAN
# Add a token as a configuration override
tokens => { $token => 'preaction' },
} );
my $c = $t->app->build_controller;
is $c->current_user, undef, 'current_user not set';
$c->req->headers->authorization( 'NOTATOKEN' );
is $c->current_user, undef, 'current_user without "Token"';
$c->req->headers->authorization( 'Token NOTFOUND' );
is $c->current_user, undef, 'current_user token incorrect';
$c->req->headers->authorization( "Token $token" );
is $c->current_user, 'preaction', 'current_user correct';
</code></pre>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Cat/Schroedinger.pm view on Meta::CPAN
'kittens' => 'inherit', # inherit | default | random
'mutable' => '1', # 0 | 1 # never usable
%options
);
return $attrs{$attr} if exists $attrs{$attr}; # check caller
my $coopRef = ($attrs{temperament} eq 'cooperative' or ($attrs{temperament} eq 'random' and int(rand(2)) ) )? undef:'';
my %overload = (
'0+' => sub {return ($_[0]= defined $coopRef?die:0);},
'""' => sub {return ($_[0]= defined $coopRef?die:'');}, # todo: include temperament
'@{}' => sub {return ($_[0]=$coopRef // []);}, # todo: include temperament
'%{}' => sub {return ($_[0]=$coopRef // {});}, # todo: include temperament
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
$VERSION = '0.91';
# Storage for the pseudo-singleton
$MAIN = undef;
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
}
inc/Module/Install.pm view on Meta::CPAN
defined $_[0]
and
! ref $_[0]
and
$_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s
) ? $_[0] : undef;
}
1;
# Copyright 2008 - 2009 Adam Kennedy.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Chef.pm view on Meta::CPAN
sub dump {
my $self = shift;
my $type = shift;
$type = '' if not defined $type;
local $@ = undef;
require Data::Dumper;
my $dumper = Data::Dumper->new([$self], ['self']);
$dumper->Indent(0);
$dumper->Purity(1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ChuckNorris.pm view on Meta::CPAN
{
%defaults_overridable, # allow caller to override these in @_
@_[ 1 .. $#_ ],
( ref( $_[0] ) eq 'SCALAR' ? ( 'SourceString' => ${ $_[0] } ) : ref( $_[0] ) ? ( 'SourceHandle' => $_[0] ) : ( 'SourceFile' => $_[0] ) ),
'ShapeString' => join( '', <DATA> ),
'Shape' => undef,
%mostly_defaults, # not overridable
'Print' => 1,
}
);
}
lib/Acme/ChuckNorris.pm view on Meta::CPAN
# allow caller to override the above options in @_
@_[ 1 .. $#_ ],
( ref( $_[0] ) eq 'SCALAR' ? ( 'SourceString' => ${ $_[0] } ) : ref( $_[0] ) ? ( 'SourceHandle' => $_[0] ) : ( 'SourceFile' => $_[0] ) ),
'ShapeString' => join( '', <DATA> ),
'Shape' => undef,
}
);
}
'When Chuck Norris is SCUBA diving and surfaces too fast the ocean gets the bends.'; # return true, so very very true
view all matches for this distribution