This file contains hidden or 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
#!/opt/perl/v5.12.0/bin/perl5.12.0 | |
use 5.12.0; | |
use version qw(is_lax is_strict); | |
for (shift @ARGV) { | |
say "'$_'"; | |
say( is_lax($_) ? "...is a lax version" : "... is not a lax version" ); | |
say( is_strict($_) ? "...is a strict version" : "... is not a strict version"); | |
say( ($_ =~ $version::LAX) ? "...is a lax version" : "... is not a lax version" ); | |
say( ($_ =~ $version::STRICT) ? "...is a strict version" : "... is not a strict version"); |
This file contains hidden or 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
=for :list | |
* lazy_validation -- if true, new will attempt to convert the given metadata | |
to version 2 before attempting to validate it. This means than any | |
fixable errors will be handled by CPAN::Meta::Converter before validation. | |
(Note that this might result in invalid optional data being silently | |
dropped.) | |
This file contains hidden or 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 | |
use 5.010; | |
use strict; | |
use warnings; | |
use autodie; | |
use Path::Class; | |
use CPAN::Meta; | |
use Parallel::Iterator qw/iterate_as_array/; | |
use List::Util qw/sum/; |
This file contains hidden or 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 python | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
This file contains hidden or 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
#!/bin/sh | |
# | |
# Checks that any files added are also added to the MANIFEST | |
if git-rev-parse --verify HEAD 2>/dev/null | |
then | |
git diff-index -M --name-status HEAD -- | |
else | |
# NEEDSWORK: we should produce a diff with an empty tree here | |
# if we want to do the same verification for the initial import. |
This file contains hidden or 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
use strict; | |
use warnings; | |
use 5.010; | |
my @num2chars=split ':', '::abc:def:ghi:jkl:mno:prs:tuv:wxy'; | |
say "Enter a seven-digit phone number:"; | |
my $regex = join q{}, map { "[$num2chars[$_]]" } split //, <STDIN>, 7; | |
open my $dict, 'C:\Scripts\wordlist.txt' or die $!; |
This file contains hidden or 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
use 5.010; | |
use strict; | |
use warnings; | |
use ExtUtils::MakeMaker; | |
use version; | |
my $file = shift @ARGV or die "Usage: $0 <file>\n"; | |
my $version = version->parse( MM->parse_version( $file ) ); | |
say "Found version $version"; | |
say "Is dotted-decimal: " . ( $version->is_qv ? "yes" : "no" ); |
This file contains hidden or 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
use strict; | |
use warnings; | |
package Task::Foo; | |
# ABSTRACT: No abstract given for Task::Foo | |
=pkgroup Modules That are Useful | |
=pkg Package::Name 1 foo | |
1; |
This file contains hidden or 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
use strict; | |
use warnings; | |
package Task::Foo; | |
# ABSTRACT: No abstract given for Task::Foo | |
1; | |
=pkgroup Modules That are Useful | |
=pkg Package::Name 1 foo |
This file contains hidden or 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
use strict; | |
use warnings; | |
package Task::Foo; | |
# ABSTRACT: No abstract given for Task::Foo | |
=pod | |
=pkgroup Modules That are Useful | |
=pkg Package::Name 1 foo |