This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl api.metacpan.org/file/_search -d '{ "filter": {"and":[ {"missing": {"field": "documentation"}}, {"exists": {"field": "file.module.name"}}, {"exists": {"field": "description"}}, {"term": {"mime": "text/x-script.perl-module"}}, {"term": {"status": "latest"}} ]}, "fields": ["distribution", "path", "file.module.name", "date"], "size":1140, "sort": [{"date":"desc"}] }' > unnamed-pod.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cpangrep '=head1\s{2,}NAME\b' | |
147 results in 23 files. Showing first 23 results. | |
BLX/XSDSQL_20130411/xsdsql/lib/blx/xsdsql/connection.pm | |
130: | |
131:=head1 NAME | |
→ 115 more files matched in XSDSQL_20130411. | |
CPANEL/cPanel-TaskQueue-0.606/lib/cPanel/TaskQueue.pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -e ' print "hi\n\n=F\0?}\302\240\0?}\302\200\n\nyo\n" '| perl -0777 -M'5; sub Pod::Simple::DEBUG { 10 }' -MPod::Text -ne ' my $parser = Pod::Text->new( code => 0, alt => 1, sentence => 0, width => 78 ); $parser->no_errata_section(1); $parser->parse_string_document($_) ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Module::Faker should prepend 3 lines above this | |
=head1 NAME | |
Pod::With::Data::Token - yo | |
=head1 SYNOPSIS | |
use warnings; | |
print <DATA>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# This chunk of stuff was generated by App::FatPacker. To find the original | |
# file's code, look for the end of this BEGIN block or the string 'FATPACK' | |
BEGIN { | |
my %fatpacked; | |
$fatpacked{"Devel/PatchPerl.pm"} = <<'DEVEL_PATCHPERL'; | |
package Devel::PatchPerl; | |
BEGIN { | |
$Devel::PatchPerl::VERSION = '0.32'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original weirdness: same result changing local to my and if(){} to bare {} | |
sub weird { | |
my ($c) = @_; | |
if( ref $c ){ | |
return (ref $c eq 'SCALAR' ? 't' : do { local $/; warn "# doing\n"; 'do'; }); | |
} | |
return 'r'; | |
} | |
# fix: no local, no my |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package accessor_maker; | |
sub import { | |
no strict 'refs'; | |
*{ caller() . '::' . 'foo' } = sub { $_[0]->{ 'foo' } }; | |
} | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$arg = ' ' . shift @ARGV; | |
$script = qq[perl pipe1.pl $arg]; | |
system(q{perl -e "print qq[hi$/there$/]" | } . $script); | |
use IPC::Open2 "open2"; | |
$pid = open2($out, $in, $script); | |
$|=1; | |
print $in qq[hi$/there$/]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*$ perl -MJSON -Mojo -e '$j = j(p( $ARGV[1], $ARGV[0] )->body); @f = map { $_->{fields} } @{ $j->{hits}{hits} }; print @f ? JSON->new->utf8->pretty->encode([@f, {total => $j->{hits}{total}}]) : $j' '{"query":{"match_all":{}}, "filter":{"and":[ {"term":{"module.indexed":true}}, {"term":{"status":"latest"}}, {"not": {"or": [{"prefix":{"path":"lib/"}}, {"term":{"level":0}}] } }]}, "fields":["release", "module.name", "path"],"size":50}' "https://api.metacpan.org/module/_search" | |
[ | |
{ | |
"module.name" : "XML::Pastor::Test::Type::Country_name", | |
"path" : "test/out/lib/XML/Pastor/Test/Type/Country_name.pm", | |
"release" : "XML-Pastor-1.0.4" | |
}, | |
{ | |
"module.name" : "XML::Pastor::Test::Type::Country", | |
"path" : "test/out/lib/XML/Pastor/Test/Type/Country.pm", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package inc::AlienBuild; | |
use Moose; | |
extends 'Dist::Zilla::Plugin::ModuleBuild'; | |
with 'Dist::Zilla::Role::FileGatherer'; | |
sub gather_files { | |
my ($self) = @_; | |
my $file = $self->zilla->main_module->name; |
OlderNewer