view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2011.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2011;
our $DATE = '2016-11-06'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2011/] (retrieved on 2016-11-06). Visit the URL for the full contents.",entries=>[{module=>"ExtUtils::MakeMaker"},{module=>"Modu...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2011
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2011.pm view on Meta::CPAN
=item * L<Unicode::Tussle>
=item * L<perl5i>
=item * L<utf8>
=item * L<utf8::all>
=item * L<Apache::DBI>
=item * L<DBIx::Class>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2017.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2017;
our $DATE = '2018-01-01'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2017/] (retrieved on 2018-01-01). Visit the URL for the full contents.",entries=>[{module=>"App::GHPT::Wrapper::Ourperl"},{modul...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2017
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2017.pm view on Meta::CPAN
=item * L<WWW::YouTube::Download>
=item * L<Path::Tiny>
=item * L<utf8>
=item * L<DBIx::Class>
=item * L<Test::Perl::Critic>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/HTMLTable.pm view on Meta::CPAN
package Acme::CPANModules::HTMLTable;
use 5.010001;
use strict;
use warnings;
#use utf8;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-HTMLTable'; # DIST
our $VERSION = '0.002'; # VERSION
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).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
package Acme::CPANModules::TextTable;
use 5.010001;
use strict;
use warnings;
use utf8;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-31'; # DATE
our $DIST = 'Acme-CPANModules-TextTable'; # DIST
our $VERSION = '0.016'; # VERSION
lib/Acme/CPANModules/TextTable.pm view on Meta::CPAN
_
bench_code => sub {
my ($table) = @_;
my $t = Text::ANSITable->new(
use_utf8 => 0,
use_box_chars => 0,
use_color => 0,
columns => $table->[0],
border_style => 'ASCII::SingleLine',
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/MojoliciousAdvent/2017.pm view on Meta::CPAN
package Acme::CPANModules::Import::MojoliciousAdvent::2017;
our $DATE = '2018-12-30'; # DATE
our $VERSION = '0.001'; # VERSION
our $LIST = {description=>"This list is generated by extracting module names mentioned in [https://mojolicious.io/page/advent/2017/] (retrieved on 2018-12-30). Visit the URL for the full contents.",entries=>[{module=>"App::cpanminus"},{module=>"Mojo:...
1;
# ABSTRACT: Modules mentioned in Mojolicious Advent Calendar 2017
__END__
lib/Acme/CPANModules/Import/MojoliciousAdvent/2017.pm view on Meta::CPAN
=item * L<feature>
=item * L<strict>
=item * L<utf8>
=item * L<warnings>
=item * L<Class::Method::Modifiers>
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/https_mojolicious.io_blog_2018_12_03_higher-order-promises_ view on Meta::CPAN
<p>An "any" Promise resolves immediately when the first of its Promises resolves. This is slightly different from <code>race</code> because at least one Promise must resolve. A Promise being rejected doesn't resolve the <code>any</code>...
<p>Here's a program that extracts the configured CPAN mirrors and tests that it can get the <em>index.html</em> file. To ensure that it finds that file and not some captive portal, it looks for "Jarkko" in the body:</p>
<pre><code>use v5.28;
use utf8;
use strict;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
devdata/https_mojolicious.io_blog_2018_12_03_higher-order-promises_ view on Meta::CPAN
<p>A <code>some</code> Promise resolves when a certain number of its Promises resolve. You specify how many you need to succeed and the the <code>some</code> Promise resolves when that number resolve. This should act like <code>some</code> in <a href...
<p>This example modifies the previous program to find more than one mirror that works. You can specify the number that need to work for the <code>some</code> to resolve:</p>
<pre><code>use v5.28;
use utf8;
use strict;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
devdata/https_mojolicious.io_blog_2018_12_03_higher-order-promises_ view on Meta::CPAN
<p>A "none" Promise resolves when all of the its Promises are rejected. It's a trivial case that might be useful somewhere and I created it mostly because Perl 6 has a <a href="https://docs.perl6.org/routine/none">none Junction</a> (whi...
<p>For this very simple example, consider the task to check that no sites are that annoying "404 File Not Found":</p>
<pre><code>use v5.28;
use utf8;
use strict;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/PerlAdvent/2011.pm view on Meta::CPAN
{ module => "DBD::SQLite" },
{ module => "Encode" },
{ module => "Encode::DoubleEncodedUTF8" },
{ module => "Unicode::Tussle" },
{ module => "perl5i" },
{ module => "utf8" },
{ module => "utf8::all" },
{ module => "Apache::DBI" },
{ module => "DBIx::Class" },
{ module => "DBIx::Connector" },
{ module => "Rose::DB" },
{ module => "Params::Util" },
lib/Acme/CPANModules/Import/PerlAdvent/2011.pm view on Meta::CPAN
=item * L<Unicode::Tussle>
=item * L<perl5i>
=item * L<utf8>
=item * L<utf8::all>
=item * L<Apache::DBI>
=item * L<DBIx::Class>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/PerlAdvent/2017.pm view on Meta::CPAN
package Acme::CPANModules::Import::PerlAdvent::2017;
our $DATE = '2018-02-18'; # DATE
our $VERSION = '0.001'; # VERSION
our $LIST = {description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2017/] (retrieved on 2018-02-18). Visit the URL for the full contents.",entries=>[{module=>"App::GHPT::Wrapper::Ourperl"},{module=>"Term:...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2017
__END__
lib/Acme/CPANModules/Import/PerlAdvent/2017.pm view on Meta::CPAN
=item * L<Perl::Critic>
=item * L<Devel::MAT>
=item * L<utf8>
=item * L<Emoji::NationalFlag>
=item * L<DBIx::Class>
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/http_advent.perldancer.org_2018_20 view on Meta::CPAN
<pre class="prettyprint">use Mojo::Base -strict;</pre>
<p>Now if you aren't familiar, <code>use Mojo::Base -strict</code> is a quick way to say</p>
<pre class="prettyprint">use strict;
use warnings;
use utf8;
use IO::Handle;
use feature ':5.10';</pre>
<p>but saves a lot of typing.
Next we load the necessary testing libraries.
devdata/http_advent.perldancer.org_2018_20 view on Meta::CPAN
<p>Each of the above method calls is a test.
The first, <code>get_ok</code>, builds a transaction and requests the resource.
Since the url is relative, it is handled by the app (if we wanted we could request and web resource too using a fully qualified url).
The transaction is stored in the tester object (<code>$t</code>) and all following tests will check it until it is replaced by the next request.</p>
<p>The remaining tests are reasonably self-explanatory, we check that the response status was 200, that we got a content type header that we expected and that its content is as we expect.
The content has already been utf-8 decoded, and the script has implicitly <code>use utf8</code>, so if you expected unicode, you can compare them easily.
The tests return the tester object so chaining is possible, making for visually clean sets of tests.</p>
<p>The next test is similar but this one uses the standard <a href="https://mojolicious.org/perldoc/Mojo/UserAgent">Mojo::UserAgent</a> style request generation to build a query string naming Santa for our greeting.
The tests are all the same except of course that it checks that the content greets Santa.</p>
<pre class="prettyprint">$t->get_ok('/text', form => { name => 'santa' })
->status_is(200)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModulesUtil/Bencher.pm view on Meta::CPAN
module => 'Text::ANSITable',
...
bench_code => sub {
my ($table) = @_;
my $t = Text::ANSITable->new(
use_utf8 => 0,
use_box_chars => 0,
use_color => 0,
columns => $table->[0],
border_style => 'Default::single_ascii',
);
lib/Acme/CPANModulesUtil/Bencher.pm view on Meta::CPAN
module => 'Text::ANSITable',
...
bench_code => sub {
my ($table) = @_;
my $t = Text::ANSITable->new(
use_utf8 => 0,
use_box_chars => 0,
use_color => 0,
columns => $table->[0],
border_style => 'Default::single_ascii',
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Capture.pm view on Meta::CPAN
no warnings 'redefine';
eval <<'EOT' or die "Can't redefine _relayer() ==> $@";
sub Capture::Tiny::_relayer {
my ($fh, $layers) = @_;
my $unix_utf8_crlf = @$layers > 4
&& $layers->[0] eq 'unix'
&& $layers->[1] eq 'crlf'
&& $layers->[2] eq 'utf8'
&& $layers->[3] eq 'unix'
&& $layers->[4] eq 'encoding(utf8)' ? 1 : 0;
if ($unix_utf8_crlf and $^O eq 'MSWin32') {
binmode($fh, ':unix:encoding(utf8):crlf');
}
else {
# _debug("# requested layers (@{$layers}) for @{[fileno $fh]}\n");
my %seen = ( unix => 1, perlio => 1 ); # filter these out
my @unique = grep { !$seen{$_}++ } @$layers;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ChuckNorris.pod view on Meta::CPAN
=encoding utf8
=head1 NAME
Acme::ChuckNorris - Perl prefers to code in Chuck Norris
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CoC/Dice.pm view on Meta::CPAN
package Acme::CoC::Dice;
use strict;
use warnings;
use utf8;
use Acme::CoC::Util;
use Acme::CoC::Types;
use Carp qw/croak/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Collector64.pm view on Meta::CPAN
Acme::Collector64 - Yet Another Base64?
=head1 SYNOPSIS
use utf8;
use Acme::Collector64;
my $japanese64 = Acme::Collector64->new(
index_table => 'ããããããããããããããããã¡ã¤ã¦ã¨ãªã«ã¬ãã®ã¯ã²ãµã¸ã»ã¾ã¿ããããããããããããããããããã°ã³ã¶ã¹ã¼ã±ã´ã·ãºã½ãããã=',
);
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/TestBase.pm view on Meta::CPAN
$self->requires('Filter::Util::Call');
}
1;
=encoding utf8
#line 70
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-simple.t view on Meta::CPAN
# Scramble everything
my $text1 = $sc->scramble;
ok( length($text1) > 0 );
$sc->feed( "Java" => io("t/text/java.txt")->utf8->all );
$sc->feed( "Perl" => io("t/text/perl.txt")->utf8->all );
$sc->feed( "XML" => io("t/text/xml.txt")->utf8->all );
$sc->feed( "Dream" => io("t/text/dream.txt")->utf8->all );
# Scramble only XML with Perl
my $text2 = $sc->scramble(qw( XML Perl) );
ok( length($text2) > 0 );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Dump/And/Dumper.pm view on Meta::CPAN
1;
__END__
=encoding utf8
=for stopwords Dump'n'Dumper clonable pneumonic
=head1 NAME
view all matches for this distribution
view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
use CPAN::Meta;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Emoticarp.pm view on Meta::CPAN
## use critic (RequireUseStrict)
use strict;
use warnings;
use parent 'Exporter';
use utf8;
use Carp ();
our @EXPORT = ('o_O', 'ಠ_ಠ');
lib/Acme/Emoticarp.pm view on Meta::CPAN
};
sub import {
my ( $class, @arguments ) = @_;
$^H |= $utf8::hint_bits; ## no critic (Bangs::ProhibitBitwiseOperators)
$class->export_to_level(1, @_);
}
1;
lib/Acme/Emoticarp.pm view on Meta::CPAN
version 0.02
=head1 SYNOPSIS
use Acme::Emoticarp; # also uses 'use utf8'
ಠ_ಠ'No user for this session!' unless defined $user;
o_O 'No arguments provided.' unless @ARGV;
=head1 DESCRIPTION
This module exports aliases for L<Carp/cluck> and L<Carp/croak>
that are more amusing to use. Because some emoticons use UTF-8
names, L<utf8> is automatically turned on in the importing environment.
=head1 FUNCTIONS
=head2 o_O
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/EnclosedChar.pm view on Meta::CPAN
package Acme::EnclosedChar;
use strict;
use warnings;
use utf8;
use parent qw/Exporter/;
our @EXPORT_OK = qw/
enclose
enclose_katakana
enclose_week_ja
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/EvaTitlenize.pm view on Meta::CPAN
package Acme::EvaTitlenize;
use 5.008005;
use strict;
use warnings;
use utf8;
use Text::VisualWidth::UTF8;
our $VERSION = "0.01";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/FixIO.pm view on Meta::CPAN
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw();
our @EXPORT_OK = qw();
binmode(STDOUT, ':unix:encoding(utf8):crlf') or die "Can't binmode STDOUT because $!";
binmode(STDERR, ':unix:encoding(utf8):crlf') or die "Can't binmode STDERR because $!";
1;
__END__
lib/Acme/FixIO.pm view on Meta::CPAN
This is caused by a bug in Windows. When writing to a console set to code
page 65001, WriteFile() returns the number of characters written instead
of the number of bytes.
Workaround: Inject a binmode(STDOUT, ':unix:encoding(utf8):crlf') into the
perl program.
=head1 AUTHOR
Klaus Eichner <klaus03@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
maint/perlcritic.rc.gen.pl view on Meta::CPAN
#!/usr/bin/env perl
## no critic (Modules::RequireVersionVar)
# ABSTRACT: Write an INI file from a bundle
use 5.008; # utf8
use strict;
use warnings;
use utf8;
our $VERSION = 0.001;
use Carp qw( croak carp );
use Perl::Critic::ProfileCompiler::Util qw( create_bundle );
maint/perlcritic.rc.gen.pl view on Meta::CPAN
my $inf = $bundle->actionlist->get_inflated;
my $config = $inf->apply_config;
{
my $rcfile = path('./perlcritic.rc')->openw_utf8;
$rcfile->print( $config->as_ini, "\n" );
close $rcfile or croak 'Something fubared closing perlcritic.rc';
}
my $deps = $inf->own_deps;
{
my $target = path('./misc');
$target->mkpath if not $target->is_dir;
my $depsfile = $target->child('perlcritic.deps')->openw_utf8;
for my $key ( sort keys %{$deps} ) {
$depsfile->printf( "%s~%s\n", $key, $deps->{$key} );
*STDERR->printf( "%s => %s\n", $key, $deps->{$key} );
}
close $depsfile or carp 'Something fubared closing perlcritic.deps';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Flip.pm view on Meta::CPAN
Acme::Flip - Replace alphanumeric characters in text with ones that look flipped
=head1 SYNOPSIS
use Acme::Flip;
binmode STDOUT, ':encoding(utf8)';
print Acme::Flip::flip ('Hello world');
=head1 DESCRIPTION
Replace alphanumeric characters in text with ones that look flipped.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/API/Geodata/GeoIP.pm view on Meta::CPAN
package Acme::Free::API::Geodata::GeoIP;
use v5.38;
use strict;
use warnings;
use utf8;
our $VERSION = '1.0';
use Data::Dumper;
use WWW::Mechanize;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/freeapi view on Meta::CPAN
use strict;
use Dispatch::Fu;
use Acme::Free::Public::APIs qw//;
use Util::H2O::More qw/d2o Getopt2h2o o2d/;
use open qw(:std :utf8); # Ensures input/output are treated as UTF-8
use Encode;
use constant {
EXIT_SUCCESS => 0,
EXIT_ERROR => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Ghost.pm view on Meta::CPAN
package Acme::Ghost;
use warnings;
use strict;
use utf8;
=encoding utf-8
=head1 NAME
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Glue.pm view on Meta::CPAN
package Acme::Glue;
use utf8;
use strict;
use warnings;
$Acme::Glue::VERSION = "2024.12";
=encoding utf8
=head1 NAME
Acme::Glue - A placeholder module for code accompanying a Perl photo project
view all matches for this distribution
view release on metacpan or search on metacpan
((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp))
static char *
my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp)
{
sv_utf8_downgrade(sv,0);
return SvPV(sv,*lp);
}
# endif
#else
# define SvPVbyte SvPV
view all matches for this distribution