view release on metacpan or search on metacpan
lib/Log/Dispatch/Email/Async.pm view on Meta::CPAN
package Log::Dispatch::Email::Async;
use 5.010;
use strict;
use warnings; # FATAL => 'all';
# use Modern::Perl;
use Carp;
########################################################################################
# TODOs
# - add option to silenty fail, not croak, upon network unavailability
lib/Log/Dispatch/Email/Async.pm view on Meta::CPAN
Version 0.01
=head1 SYNOPSIS
#!/usr/bin/perl
use Modern::Perl;
use Log::Log4perl qw/:levels/;
use Log::Log4perl::Layout;
use Proc::Daemon;
view all matches for this distribution
view release on metacpan or search on metacpan
t/perlcriticrc view on Meta::CPAN
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0
# Inform perlcritic that other things turn on strictures and warnings
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Mouse perl5i::0 perl5i::1 perl5i::2 Modern::Perl TB2::Mouse TB2::Mouse::Role Mojo::Base ojolicious
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Mouse perl5i::0 perl5i::1 perl5i::2 Modern::Perl TB2::Mouse TB2::Mouse::Role Mojo::Base Mojolicious::Lite
# "no warnings" is fine as long as it's restricted to one or more categories
[TestingAndDebugging::ProhibitNoWarnings]
allow_with_category_restriction = 1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Log/LogMethods.pm view on Meta::CPAN
package Log::LogMethods;
use Modern::Perl;
use Time::HiRes qw(tv_interval gettimeofday);
use Ref::Util qw(is_plain_hashref is_blessed_hashref);
use Scalar::Util qw(blessed);
use B qw(svref_2object);
use Scalar::Util qw(looks_like_number);
view all matches for this distribution
view release on metacpan or search on metacpan
examples/log_shiras.pl view on Meta::CPAN
#!perl
use Modern::Perl;
use lib 'lib', '../lib',;
use Log::Shiras::Unhide qw( :debug);#
use Log::Shiras::Switchboard;
use Log::Shiras::Telephone;
use Log::Shiras::Report::Stdout;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mason/Compilation.pm view on Meta::CPAN
Perl code to be added at the top of the class, just after initialization of
Moose, C<$m> and other required pieces. By default it consults the
L<class_header parameter|Mason::Interp/class_header>.
# Add to the top of every component class:
# use Modern::Perl;
# use JSON::XS qw(encode_json decode_json);
#
override 'output_class_header' => sub {
return join( "\n",
super(),
'use Modern::Perl;',
'use JSON::XS qw(encode_json decode_json);' );
};
=item process_perl_code ($coderef)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MediaCloud/JobManager.pm view on Meta::CPAN
our $VERSION = '0.27';
use strict;
use warnings;
use Modern::Perl "2012";
use MediaCloud::JobManager::Configuration;
use UUID::Tiny ':std';
use Digest::SHA qw(sha256_hex);
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
.perlcriticrc view on Meta::CPAN
[Subroutines::RequireArgUnpacking]
short_subroutine_statements = 3
# Inform perlcritic that Mouse turns on strictures
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Mouse Mouse::Role perl5i::0 perl5i::1 perl5i::2 Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Mouse Mouse::Role perl5i::0 perl5i::1 perl5i::2 Modern::Perl
# No tabs ever
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Modern/Perl.pm view on Meta::CPAN
package Modern::Perl;
# ABSTRACT: enable all of the features of Modern Perl with one import
$Modern::Perl::VERSION = '1.20250607';
use 5.010_000;
use strict;
use warnings;
lib/Modern/Perl.pm view on Meta::CPAN
sub VERSION {
my ($self, $version) = @_;
my $default = 2025;
return $Modern::Perl::VERSION || $default unless defined $version;
return $Modern::Perl::VERSION || $default if $version < 2009;
$wanted_date = $version if (caller(1))[3] =~ /::BEGIN/;
return $default;
}
lib/Modern/Perl.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
Modern::Perl - enable all of the features of Modern Perl with one import
=head1 VERSION
version 1.20250607
lib/Modern/Perl.pm view on Meta::CPAN
Modern Perl programs use several modules to enable additional features of Perl
and of the CPAN. Instead of copying and pasting all of these C<use> lines,
instead write only one:
use Modern::Perl;
This enables the L<strict> and L<warnings> pragmas, as well as all of the
features available in Perl 5.10. It also enables C3 method resolution order as
documented in C<perldoc mro> and loads L<IO::File> and L<IO::Handle> so that
you may call methods on filehandles. In the future, it may include additional
core modules and pragmas (but is unlikely to include non-core features).
Because so much of this module's behavior uses lexically scoped pragmas, you
may disable these pragmas within an inner scope with:
no Modern::Perl;
See L<http://www.modernperlbooks.com/mt/2009/01/toward-a-modernperl.html> for
more information, L<http://www.modernperlbooks.com/> for further discussion of
Modern Perl and its implications, and
L<http://onyxneon.com/books/modern_perl/index.html> for a freely-downloadable
Modern Perl tutorial.
=head2 CLI Usage
As of Modern::Perl 2019, you may also enable this pragma from the command line:
$ perl -Modern::Perl -e 'say "Take that, awk!"'
You may also enable year-specific features:
$ perl -Modern::Perl=2020 -e 'say "Looking forward to Perl 5.30!"'
=head2 Wrapping Modern::Perl
If you want to wrap Modern::Perl in your own C<import()> method, you can do so
to add additional pragmas or features, such as the use of L<Try::Tiny>. Please
note that, if you do so, you will I<not> automatically enable C3 method
resolution in the calling scope. This is due to how the L<mro> pragma works. In
your custom C<import()> method, you will need to write code such as:
lib/Modern/Perl.pm view on Meta::CPAN
=head2 Forward Compatibility
For forward compatibility, I recommend you specify a string containing a
I<year> value as the single optional import tag. For example:
use Modern::Perl '2009';
use Modern::Perl '2010';
... both enable 5.10 features, while:
use Modern::Perl '2011';
... enables 5.12 features:
use Modern::Perl '2012';
... enables 5.14 features:
use Modern::Perl '2013';
... enables 5.16 features, and:
use Modern::Perl '2014';
... enables 5.18 features, and:
use Modern::Perl '2015';
... enables 5.20 features, and:
use Modern::Perl '2016';
... enables 5.24 features, and:
use Modern::Perl '2017';
... enables 5.24 features, and:
use Modern::Perl '2018';
... enables 5.26 features, and:
use Modern::Perl '2019';
... enables 5.28 features, and:
use Modern::Perl '2020';
... enables 5.30 features, and:
use Modern::Perl '2021';
... enables 5.32 features, and:
use Modern::Perl '2022';
... enables 5.34 features, and:
use Modern::Perl '2023';
... enables 5.36 features, and:
use Modern::Perl '2024';
... enables 5.38 features, and:
use Modern::Perl '2025';
... enables 5.40 features.
Obviously you cannot use newer features on earlier versions. Perl will throw
the appropriate exception if you try.
lib/Modern/Perl.pm view on Meta::CPAN
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Modern::Perl
You can also look for information at:
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/CPANTS/Kwalitee/Uses.pm view on Meta::CPAN
common::sense
Any::Moose
Catmandu::Sane Coat
Dancer
Mo Mu
Modern::Perl
Moo Moo::Role
Moose Moose::Role Moose::Exporter
Moose::Util::TypeConstraints Moose::Util::MetaRole
MooseX::Declare MooseX::Role::Parameterized MooseX::Types
Mouse Mouse::Role
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojito.pm view on Meta::CPAN
my $implicit_section = <<'END';
h1. Greetings
<sx c=Perl>
use Modern::Perl;
say 'something';
</sx>
Implicit Section
view all matches for this distribution
view release on metacpan or search on metacpan
}
},
"test" : {
"requires" : {
"File::Slurp" : "0",
"Modern::Perl" : "0",
"Test::Differences" : "0",
"Test::Kwalitee" : "0",
"Test::MockTime" : "0.17",
"Test::Mojo" : "0",
"Test::More" : "0",
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
"IO::All" => 0,
"Mojo::Base" => 0
},
"test_requires" => {
"Config::Any" => 0,
"Modern::Perl" => 0,
"Mojolicious::Lite" => 0,
"Test::Mojo" => 0,
"Test::More" => 0,
"Test::Pod" => 0,
"Test::Pod::Coverage" => "1.00",
);
my %fallback_build_requires = (
"Config::Any" => 0,
"Modern::Perl" => 0,
"Module::Build" => "0.28",
"Mojolicious::Lite" => 0,
"Test::Mojo" => 0,
"Test::More" => 0,
"Test::Pod" => 0,
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/DevexpressHelpers.pm view on Meta::CPAN
package Mojolicious::Plugin::DevexpressHelpers;
$Mojolicious::Plugin::DevexpressHelpers::VERSION = '0.163572';
#ABSTRACT: Add some helpers to add and configure Devexpress controls
use Modern::Perl;
use Mojo::Base 'Mojolicious::Plugin';
use Mojolicious::Plugin::DevexpressHelpers::Helpers;
use MojoX::AlmostJSON;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/Mandel.pm view on Meta::CPAN
package Mojolicious::Plugin::Mandel;
use Modern::Perl;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::Loader qw(data_section find_modules load_class);
our $VERSION = '0.1.1'; # VERSION
# ABSTRACT: A plugin for mango document model called Mandel.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/Mango.pm view on Meta::CPAN
package Mojolicious::Plugin::Mango;
use Modern::Perl;
use Mango;
use Mojo::Base 'Mojolicious::Plugin';
use namespace::clean;
our $VERSION = '0.0.2'; # VERSION
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/RESTRoutes.pm view on Meta::CPAN
use Modern::Perl; # strict, warnings etc.;
package Mojolicious::Plugin::RESTRoutes;
# ABSTRACT: routing helper for RESTful operations
# VERSION
$Mojolicious::Plugin::RESTRoutes::VERSION = '1.0.0';
use Mojo::Base 'Mojolicious::Plugin';
view all matches for this distribution
view release on metacpan or search on metacpan
"Mojo::Exception" => 0,
"Mojo::Util" => 0
},
"script_files" => [],
"test_requires" => {
"Modern::Perl" => 0,
"Mojolicious::Lite" => 0,
"Test::Mojo" => 0,
"Test::More" => 0,
"Test::Pod" => 0,
"Test::Pod::Coverage" => "1.00",
}
);
my %fallback_build_requires = (
"Modern::Perl" => 0,
"Module::Build" => "0.28",
"Mojolicious::Lite" => 0,
"Test::Mojo" => 0,
"Test::More" => 0,
"Test::Pod" => 0,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/SemanticUIPageNavigator.pm view on Meta::CPAN
package Mojolicious::Plugin::SemanticUIPageNavigator;
use Mojo::Base 'Mojolicious::Plugin';
use POSIX( qw/ceil/ );
use Mojo::DOM;
use Mojo::ByteStream 'b';
use Modern::Perl;
our $VERSION = 0.03;
# ABSTRACT: Mojolicious::Plugin::SemanticUIPageNavigator
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[-RegularExpressions::RequireLineBoundaryMatching]
[-InputOutput::RequireCheckedSyscalls]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
[TestingAndDebugging::RequireUseStrict]
[-TestingAndDebugging::ProhibitNoStrict]
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
# [-Documentation::PodSpelling]
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build|trigger_)\w+
view all matches for this distribution