view release on metacpan or search on metacpan
# Simple example using perl class.
perl -E 'use feature qw(class); no warnings qw(experimental::class); class Point { field $x :param; method show { say $x } } Point->new(x => 333)->show'
333
# Using a different name for the parameter.
perl -E 'use feature ":all"; no warnings "experimental::class"; class Point 1.2 { field $x :param(_x); method show { say $x } } Point->new(_x => 111)->show'
111
# Perl class - class block/statement.
#
# Block form:
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_TestCommon.pm view on Meta::CPAN
if ($perlargs[$ix] =~ /^-(w?)([Ee])$/) {
# Passing perl code in an argument is impractical in DOS/Windows
my $tf = Path::Tiny->tempfile("perlcode_XXXXX");
push @tfs, $tf;
# N.B. -e (not -E) can be an arg to odfedit as well
$tf->append_utf8("use feature qw/:all/;\n") if $2 eq 'E';
$tf->append_utf8($perlargs[$ix+1]);
warn "============= DUMP OF -$1$2 FILE ===========\n", "".scalar($tf->slurp_utf8), "\n=============(end)============\n" if $debug;
splice @perlargs, $ix, 2, ($1 ? ("-w") : ()), $tf->canonpath;
$ix += 2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_TestCommon.pm view on Meta::CPAN
if ($perlargs[$ix] =~ /^-(w?)([Ee])$/) {
# Passing perl code in an argument is impractical in DOS/Windows
my $tf = Path::Tiny->tempfile("perlcode_XXXXX");
push @tfs, $tf;
# N.B. -e (not -E) can be an arg to odfedit as well
$tf->append_utf8("use feature qw/:all/;\n") if $2 eq 'E';
$tf->append_utf8($perlargs[$ix+1]);
warn "============= DUMP OF -$1$2 FILE ===========\n", "".scalar($tf->slurp_utf8), "\n=============(end)============\n" if $debug;
splice @perlargs, $ix, 2, ($1 ? ("-w") : ()), $tf->canonpath;
$ix += 2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/FastPack/JPacker.pm view on Meta::CPAN
use Data::JPack; # For packing/unpacking JPack
use File::Path qw<make_path>;
use File::Spec::Functions qw<rel2abs abs2rel>;
use File::Basename qw<basename dirname>;
use feature ":all";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/FastPack.pm view on Meta::CPAN
use strict;
use warnings;
our $VERSION="v0.2.0";
use feature ":all";
no warnings "experimental";
use Export::These qw<decode_fastpack encode_fastpack decode_message encode_message create_namespace name_for_id id_for_name FP_MSG_TIME FP_MSG_ID FP_MSG_PAYLOAD FP_MSG_TOTAL_LEN>;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/JPack.pm view on Meta::CPAN
package Data::JPack;
use strict;
use warnings;
use feature ":all";
our $VERSION="v0.1.0";
use feature qw<say>;
no warnings "experimental";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Error/Show.pm view on Meta::CPAN
#Take an error string and attempt to contextualize it
# context options_pairs, error string
sub _context{
#use feature ":all";
DEBUG and say STDERR "IN context call";
#my ($package, $file, $caller_line)=caller;
#
# Error is set by single argument, key/value pair, or if no
# argument $@ is used
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-parse-set-cookie.t view on Meta::CPAN
use strict;
use warnings;
use feature ":all";
##################################
# use Log::ger::Output "Screen"; #
# use Log::OK { #
# lvl=>"info", #
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-IO-FD.t view on Meta::CPAN
# change 'tests => 1' to 'tests => last_test_to_print';
use strict;
use warnings;
use feature ":all";
use Test::More tests => 1;
BEGIN { use_ok('IO::FD') };
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Import/These/Internal/Test2.pm view on Meta::CPAN
package Import::These::Internal::Test2;
use strict;
use warnings;
use feature ":all";
use Exporter "import";
our @EXPORT=qw<default_sub>;
view all matches for this distribution
view release on metacpan or search on metacpan
benchmark/bench.pl view on Meta::CPAN
my $size=$ARGV[0]//10000;
my @list=sort {$a->{value} <=> $b->{value} } map {{value=>rand($max)}} 1..$size;
my @keys=map rand($max), 1..10;
use feature ":all";
cmpthese DEBUG ? 1 : -1, {
"L::BS::PP"=>sub {
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_TestCommon.pm view on Meta::CPAN
if ($perlargs[$ix] =~ /^-(w?)([Ee])$/) {
# Passing perl code in an argument is impractical in DOS/Windows
my $tf = Path::Tiny->tempfile("perlcode_XXXXX");
push @tfs, $tf;
# N.B. -e (not -E) can be an arg to odfedit as well
$tf->append_utf8("use feature qw/:all/;\n") if $2 eq 'E';
$tf->append_utf8($perlargs[$ix+1]);
warn "============= DUMP OF -$1$2 FILE ===========\n", "".scalar($tf->slurp_utf8), "\n=============(end)============\n" if $debug;
splice @perlargs, $ix, 2, ($1 ? ("-w") : ()), $tf->canonpath;
$ix += 2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_TestCommon.pm view on Meta::CPAN
if ($perlargs[$ix] =~ /^-(w?)([Ee])$/) {
# Passing perl code in an argument is impractical in DOS/Windows
my $tf = Path::Tiny->tempfile("perlcode_XXXXX");
push @tfs, $tf;
# N.B. -e (not -E) can be an arg to odfedit as well
$tf->append_utf8("use feature qw/:all/;\n") if $2 eq 'E';
$tf->append_utf8($perlargs[$ix+1]);
warn "============= DUMP OF -$1$2 FILE ===========\n", "".scalar($tf->slurp_utf8), "\n=============(end)============\n" if $debug;
splice @perlargs, $ix, 2, ($1 ? ("-w") : ()), $tf->canonpath;
$ix += 2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_TestCommon.pm view on Meta::CPAN
if ($perlargs[$ix] =~ /^-(w?)([Ee])$/) {
# Passing perl code in an argument is impractical in DOS/Windows
my $tf = Path::Tiny->tempfile("perlcode_XXXXX");
push @tfs, $tf;
# N.B. -e (not -E) can be an arg to odfedit as well
$tf->append_utf8("use feature qw/:all/;\n") if $2 eq 'E';
$tf->append_utf8($perlargs[$ix+1]);
warn "============= DUMP OF -$1$2 FILE ===========\n", "".scalar($tf->slurp_utf8), "\n=============(end)============\n" if $debug;
splice @perlargs, $ix, 2, ($1 ? ("-w") : ()), $tf->canonpath;
$ix += 2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/experiment.pl view on Meta::CPAN
use feature ":all";
use strict;
use warnings;
#use strict;
#no warnings "uninitialized";
use Template::Plex;
view all matches for this distribution
view release on metacpan or search on metacpan
script/build-menu.pl view on Meta::CPAN
use Template::Plexsite;
use JSON;
#use GetOpt::Long;
use feature ":all";
my $html_root="site";
#Takes a list or multiple input templates
#Generates a table mapping template path to output path and tag name
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_TestCommon.pm view on Meta::CPAN
if ($perlargs[$ix] =~ /^-(w?)([Ee])$/) {
# Passing perl code in an argument is impractical in DOS/Windows
my $tf = Path::Tiny->tempfile("perlcode_XXXXX");
push @tfs, $tf;
# N.B. -e (not -E) can be an arg to odfedit as well
$tf->append_utf8("use feature qw/:all/;\n") if $2 eq 'E';
$tf->append_utf8($perlargs[$ix+1]);
warn "============= DUMP OF -$1$2 FILE ===========\n", "".scalar($tf->slurp_utf8), "\n=============(end)============\n" if $debug;
splice @perlargs, $ix, 2, ($1 ? ("-w") : ()), $tf->canonpath;
$ix += 2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/exact.pm view on Meta::CPAN
Instead of this:
use strict;
use warnings;
use feature ':all';
no warnings "experimental";
use utf8;
use open ':std', ':utf8';
use mro 'c3';
use IO::File;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/feature.pm view on Meta::CPAN
use feature ":5.14.0"; # same as ":5.14"
use feature ":5.14.1"; # same as ":5.14"
You can also do:
use feature ":all";
or
no feature ":all";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/sanity.pm view on Meta::CPAN
# ...these statements
use strict;
use warnings;
use mro 'dfs';
use feature ':all';
use IO::File;
use IO::Handle;
Basically, it does the same thing as the meta pragma L<Modern::Perl>, except
you actually don't need that module for it to work. While there is some magic
view all matches for this distribution
view release on metacpan or search on metacpan
benchmarks/usac.pl view on Meta::CPAN
use Benchmark qw<cmpthese>;
use Plack::MIME;
use MIME::Detect;
use feature ":all";
my $db=uSAC::MIME->new->index;
my $detect=MIME::Detect->new;
my $count=$ARGV[0]//10_000_000;
view all matches for this distribution