view release on metacpan or search on metacpan
lib/Context/Singleton.pm view on Meta::CPAN
}
sub import {
my ($class, @params) = @_;
my $globals = Ref::Util::is_hashref ($params[0])
? shift @params
: {}
;
$globals->{into} //= scalar caller;
view all matches for this distribution
view release on metacpan or search on metacpan
"warnings" : "0"
}
},
"test" : {
"requires" : {
"Ref::Util" : "0",
"Test::More" : "0",
"utf8" : "0"
}
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/ColumnNames.pm view on Meta::CPAN
use v5.20;
use warnings;
use parent 'DBIx::Class';
use Ref::Util qw( is_plain_hashref is_ref );
# RECOMMEND PREREQ: Ref::Util::XS
use experimental qw( lexical_subs postderef signatures );
use namespace::clean;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/Row/Enumeration.pm view on Meta::CPAN
use v5.10.1;
use strict;
use warnings;
use Ref::Util ();
use Sub::Quote ();
# RECOMMEND PREREQ: Ref::Util::XS
our $VERSION = 'v0.1.8';
# The names of all methods installed by this module.
my %MINE;
lib/DBIx/Class/Helper/Row/Enumeration.pm view on Meta::CPAN
sub add_columns {
my ( $self, @cols ) = @_;
$self->next::method(@cols);
my $class = Ref::Util::is_ref($self) || $self;
foreach my $col (@cols) {
next if ref $col;
lib/DBIx/Class/Helper/Row/Enumeration.pm view on Meta::CPAN
my $handlers = $info->{extra}{handles} //= sub { "is_" . $_[0] };
next unless $handlers;
if ( Ref::Util::is_plain_coderef($handlers) ) {
$info->{extra}{handles} = {
map {
if ( my $method = $handlers->( $_, $col, $class ) ) {
( $method => $_ )
lib/DBIx/Class/Helper/Row/Enumeration.pm view on Meta::CPAN
};
$handlers = $info->{extra}{handles};
}
DBIx::Class::Exception->throw("handles is not a hashref")
unless Ref::Util::is_plain_hashref($handlers);
foreach my $handler ( keys %$handlers ) {
next unless $handler;
my $value = $handlers->{$handler} or next;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/Row/Types.pm view on Meta::CPAN
# ABSTRACT: Use Types to define rows
use v5.14;
use warnings;
use Ref::Util ();
use Safe::Isa 1.000008 qw/ $_isa $_can $_call_if_can /;
use Types::SQL::Util v0.3.0 ();
# RECOMMEND PREREQ: Ref::Util::XS
# RECOMMEND PREREQ: Type::Tiny::XS
our $VERSION = 'v0.4.0';
lib/DBIx/Class/Helper/Row/Types.pm view on Meta::CPAN
}
sub _apply_types_to_column_defition {
my ( $self, $column_info ) = @_;
return $column_info unless Ref::Util::is_ref $column_info;
$column_info = { isa => $column_info }
if $column_info->$_isa('Type::Tiny');
my $type = $column_info->{isa} or return $column_info;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/SimpleStats.pm view on Meta::CPAN
use base qw( DBIx::Class );
use Carp;
use List::Util 1.45 qw/ uniqstr /;
use Ref::Util qw/ is_plain_hashref is_ref /;
# RECOMMEND PREREQ: Ref::Util::XS
use namespace::clean;
our $VERSION = 'v0.1.3';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/TableSample.pm view on Meta::CPAN
use v5.14;
use warnings;
use parent 'DBIx::Class';
use Ref::Util qw/ is_plain_arrayref is_plain_hashref is_plain_scalarref /;
# RECOMMEND PREREQ: Ref::Util::XS
use namespace::clean;
our $VERSION = 'v0.7.0';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/WindowFunctions.pm view on Meta::CPAN
use v5.14;
use warnings;
use parent 'DBIx::Class::ResultSet';
use Ref::Util qw/ is_plain_arrayref is_plain_hashref /;
# RECOMMEND PREREQ: Ref::Util::XS
use namespace::clean;
our $VERSION = 'v0.6.0';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Smooth/Functions.pm view on Meta::CPAN
use Carp qw/croak/;
use List::Util qw/uniq/;
use List::SomeUtils qw/any/;
use boolean;
use Ref::Util qw/is_scalarref is_refref is_arrayref/;
use Sub::Exporter::Progressive -setup => {
exports => [qw/
Ascii
Bin
Char
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer/Plugin/Chain.pm view on Meta::CPAN
package
Dancer::Plugin::Chain::Link;
use Moose;
use Ref::Util qw/ is_coderef is_ref /;
use List::Util qw/ reduce /;
use overload '@{}' => sub { [ $_[0]->as_route ] };
# all segments as passed to the chain
view all matches for this distribution
view release on metacpan or search on metacpan
t/documents/timetable.gpw2016.ics view on Meta::CPAN
nal opcodes!
DTEND;TZID=Europe/Berlin:20160310T125000
DTSTART;TZID=Europe/Berlin:20160310T121000
LOCATION:Booking.com
ORGANIZER:Sawyer X
SUMMARY:Ref::Util: accurate functions in XS for checking references
UID:http://act.yapc.eu/gpw2016/talk/6521
URL:http://act.yapc.eu/gpw2016/talk/6521
END:VEVENT
BEGIN:VEVENT
ATTENDEE:Nicholas Clark
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/ParamTypes.pm view on Meta::CPAN
};
use Carp ();
use Dancer2::Plugin;
use Scalar::Util ();
use Ref::Util qw< is_ref is_arrayref >;
plugin_keywords(qw<register_type_check register_type_action with_types>);
has 'type_checks' => (
'is' => 'ro',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/Routing.pm view on Meta::CPAN
use 5.10.0;
use strict;
use warnings;
use Dancer2::Plugin;
use Ref::Util qw/is_hashref/;
use base qw/Dancer2::Plugin::RootURIFor/;
=head1 NAME
Dancer2::Plugin::Routing - A dancer2 plugin for configurable routing.
view all matches for this distribution
view release on metacpan or search on metacpan
"File::Spec" : "0",
"HTTP::Request::Common" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Plack::Test" : "0",
"Ref::Util" : "0",
"Test::More" : "0"
}
}
},
"provides" : {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Session/DatabasePlugin.pm view on Meta::CPAN
use Moo;
use Data::Dumper;
use Dancer2::Core::Types;
use Dancer2::Plugin::Database;
use Carp qw(croak);
use Ref::Util qw(is_plain_hashref);
use Storable qw(nfreeze thaw);
with 'Dancer2::Core::Role::SessionFactory';
our $VERSION="1.0014";
our $HANDLE_SQL_STRING=\&stub_function;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Core/App.pm view on Meta::CPAN
use Module::Runtime 'is_module_name';
use Safe::Isa;
use Sub::Quote;
use File::Spec;
use Module::Runtime qw< require_module use_module >;
use Ref::Util qw< is_ref is_arrayref is_globref is_scalarref is_regexpref >;
use Plack::App::File;
use Plack::Middleware::FixMissingBodyInRedirect;
use Plack::Middleware::Head;
use Plack::Middleware::Conditional;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Edit/Struct.pm view on Meta::CPAN
use Exporter 'import';
our $VERSION = '0.07';
use Ref::Util qw[
is_plain_arrayref is_arrayref
is_plain_hashref is_hashref
is_scalarref is_ref is_coderef
];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Frame.pm view on Meta::CPAN
use PDL::DateTime ();
use PDL::Primitive ();
use PDL::Factor ();
use PDL::SV ();
use PDL::StringfiableExtension;
use Ref::Util qw(is_plain_arrayref is_plain_hashref);
use Scalar::Util qw(blessed looks_like_number);
use Sereal::Encoder 4.005;
use Text::Table::Tiny;
use Type::Params;
use Types::Standard qw(
lib/Data/Frame.pm view on Meta::CPAN
# Check if all columns have same length or have a length of 1.
around BUILDARGS($orig, $class : @args) {
my %args = @args;
if ( my $columns = $args{columns} ) {
my $columns_is_aref = Ref::Util::is_plain_arrayref($columns);
my $columns_href;
if ($columns_is_aref) {
$columns_href = {@$columns};
}
else {
lib/Data/Frame.pm view on Meta::CPAN
$self->_columns->delete($col_name);
}
method rename ((HashRef | CodeRef) $href_or_coderef) {
my $f =
Ref::Util::is_plain_coderef($href_or_coderef)
? $href_or_coderef
: sub { $href_or_coderef->{ $_[0] } };
my $new_names = $self->names->map( sub { $f->($_) // $_ } );
$self->names($new_names);
return $self;
lib/Data/Frame.pm view on Meta::CPAN
method column_names(@rest) {
my @colnames =
(
@rest == 1
and ( Ref::Util::is_plain_arrayref( $rest[0] )
or $rest[0]->$_can('flatten') )
)
? $rest[0]->flatten
: @rest;
lib/Data/Frame.pm view on Meta::CPAN
my ($self, @rest) = @_;
if( @rest ) {
# setting row names
my $new_rows;
if ( ref $rest[0] ) {
if ( Ref::Util::is_plain_arrayref($rest[0]) ) {
$new_rows = [ @{$rest[0]} ];
}
elsif ( $rest[0]->isa('PDL') ) {
# TODO just run uniq?
lib/Data/Frame.pm view on Meta::CPAN
($func) = $check->($func);
my $class = ref($self);
my @columns;
if ( Ref::Util::is_coderef($func) ) {
@columns =
$self->names->map( sub {
$_ => $func->( $self->column($_), $self );
} )->flatten;
}
else { # hashref or arrayref
my $column_names = $self->names;
my $hashref;
my @new_column_names;
if ( Ref::Util::is_hashref($func) ) {
$hashref = $func;
@new_column_names =
grep { !$self->exists($_) } sort( keys %$hashref );
}
else { # arrayref
lib/Data/Frame.pm view on Meta::CPAN
my $row_indices = $self->sorti( $by_columns, $ascending );
return $self->select_rows($row_indices);
}
method sorti ($by_columns, $ascending=true) {
if (Ref::Util::is_plain_arrayref($ascending)) {
$ascending = logical($ascending);
}
return pdl( [ 0 .. $self->nrow - 1 ] ) if $by_columns->length == 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/HTML/TreeDumper.pm view on Meta::CPAN
use warnings;
use utf8;
use Encode;
use Carp qw(croak);
use YAML::Syck qw(Load LoadFile Dump DumpFile);
use Ref::Util qw(is_ref is_scalarref is_arrayref is_hashref);
use Const::Fast;
use HTML::Entities;
use HTML::AutoTag;
use version 0.77; our $VERSION = version->declare("v0.0.4");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Pageset/Exponential.pm view on Meta::CPAN
use asa 'Data::Page';
use namespace::autoclean;
# RECOMMEND PREREQ: Type::Tiny::XS
# RECOMMEND PREREQ: Ref::Util::XS
our $VERSION = 'v0.4.1';
has total_entries => (
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Record/Serialize/Role/Base.pm view on Meta::CPAN
use Data::Record::Serialize::Util -all;
use Types::Standard qw[ ArrayRef CodeRef CycleTuple HashRef Enum Str Bool is_HashRef Maybe ];
use Data::Record::Serialize::Types qw( SerializeType );
use Ref::Util qw( is_coderef is_arrayref );
use List::Util 1.33 qw( any );
use POSIX ();
use namespace::clean;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Section/Pluggable.pm view on Meta::CPAN
# ABSTRACT: Read structured data from __DATA__
use Class::Tiny qw( package prefer_filesystem filename _formats _cache );
use Exporter qw( import );
use Ref::Util qw( is_ref is_plain_hashref is_coderef is_plain_arrayref is_blessed_ref );
use MIME::Base64 qw( decode_base64 encode_base64 );
use Path::Tiny 0.130 ();
use Carp ();
our @EXPORT_OK = qw( get_data_section );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Section/Writer.pm view on Meta::CPAN
use Path::Tiny ();
use Carp ();
use Class::Tiny qw( perl_filename _files _same _formats );
use Ref::Util qw( is_coderef is_blessed_ref is_plain_arrayref );
use MIME::Base64 qw(encode_base64);
sub BUILD ($self, $) {
# use the callers filename if not provided.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Transmute.pm view on Meta::CPAN
use 5.010001;
use strict 'subs', 'vars';
use warnings;
use Log::ger;
use Ref::Util qw(is_hashref is_arrayref is_plain_hashref is_plain_arrayref);
use Scalar::Util qw(refaddr);
use Exporter qw(import);
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Datahub/Factory/Util.pm view on Meta::CPAN
our $VERSION = '1.77';
use Exporter qw(import);
use Scalar::Util ();
use Ref::Util ();
our %EXPORT_TAGS = (
misc => [qw(require_package)]
);
our @EXPORT_OK = map {@$_} values %EXPORT_TAGS;
$EXPORT_TAGS{all} = \@EXPORT_OK;
# globtype Reference
*is_ref = \&Ref::Util::is_ref;
# globtype Reference
*is_glob_ref = \&Ref::Util::is_plain_globref;
# Output everything in UTF-8
binmode STDOUT, ":utf8";
sub is_value {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/Calc/Iterator.pm view on Meta::CPAN
use warnings;
our $VERSION = '1.02';
use Date::Calc qw( Delta_Days Add_Delta_Days check_date ) ;
use Ref::Util qw( is_arrayref is_ref );
use Carp qw( croak );
use constant FORMAT_ARRAYREF => 1;
use constant FORMAT_ISO_DASHED => 2;
use constant FORMAT_ISO_NO_DASH => 3;
view all matches for this distribution
view release on metacpan or search on metacpan
t/examples/traces/1.txt view on Meta::CPAN
Exporter::import (/opt/perl5.26.1/lib/5.26.1/Exporter.pm:28-67)
XSLoader::load (/opt/perl5.26.1/lib/5.26.1/XSLoader.pm:18-115)
DynaLoader::dl_load_file
DynaLoader::dl_find_symbol
DynaLoader::dl_install_xsub
Ref::Util::XS::bootstrap
Ref::Util::_install_aliases (/opt/perl5.26.1/lib/site_perl/5.26.1/Ref/Util.pm:22-29)
UNIVERSAL::VERSION
Specio::Declare::declare (/opt/perl5.26.1/lib/site_perl/5.26.1/Specio/Declare.pm:77-87)
Specio::Helpers::_STRINGLIKE (/opt/perl5.26.1/lib/site_perl/5.26.1/Specio/Helpers.pm:64-73)
Specio::Helpers::_STRING (/opt/perl5.26.1/lib/site_perl/5.26.1/Specio/Helpers.pm:76-78)
Specio::Declare::_make_tc (/opt/perl5.26.1/lib/site_perl/5.26.1/Specio/Declare.pm:301-314)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Optic.pm view on Meta::CPAN
use strict;
use warnings;
use Carp qw(croak);
use Scalar::Util qw(looks_like_number);
use Ref::Util qw(is_ref is_arrayref is_hashref is_scalarref is_coderef is_regexpref);
use Sub::Info qw(sub_info);
use PadWalker qw(peek_my);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/App/Command/aliendeps.pm view on Meta::CPAN
package Dist::Zilla::App::Command::aliendeps;
use strict;
use warnings;
use Dist::Zilla::App -command;
use Ref::Util qw( is_hashref );
# ABSTRACT: (DEPRECATED) Print your alien distributions alien prerequisites
our $VERSION = '0.03'; # VERSION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Author/Plicease/ReadmeAnyFromPod.pm view on Meta::CPAN
use 5.020;
use Moose;
use experimental qw( signatures );
use URI::Escape ();
use File::Which ();
use Ref::Util qw( is_plain_hashref );
use experimental qw( postderef );
# ABSTRACT: Personal subclass of Dist::Zilla::Plugin::ReadmeAnyFromPod
view all matches for this distribution