Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use strict;
use warnings;
use Readonly;
use Template;
use LWP::UserAgent;
use HTTP::Request;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
#!/usr/bin/env perl
use strict;
use warnings;
use WWW::CPANRatings::RSS;
main();
sub main {
my $five_star_modules = fetch_five_star_modules();
report_all_modules($five_star_modules);
#!/usr/bin/env perl
use strict;
use warnings;
use Carp;
use PPI::Document;
use Path::Class qw(dir);
use File::Find::Rule;
use List::MoreUtils qw(uniq any);
use Perl6::Say;
#!/usr/bin/env perl
use strict;
use warnings;
use Carp qw/croak/;
use URI;
use URI::Fetch;
use XML::RSS::LibXML;
use Path::Class qw(dir);
use Perl6::Say;
use Data::Dumper;
@dann
dann / gist:13374
Created September 27, 2008 21:09
pmsetup
#!/usr/bin/perl
use strict;
use warnings;
use ExtUtils::MakeMaker qw(prompt);
use File::Basename;
use File::Path;
use File::Spec;
use Template;
use YAML;
use Config::Pit;
Index: t/030_plugin/regexp_replacer.t
===================================================================
--- t/030_plugin/regexp_replacer.t (revision 0)
+++ t/030_plugin/regexp_replacer.t (revision 0)
@@ -0,0 +1,11 @@
+use Module::Setup::Test::Utils;
+use Test::More tests => 2;
+
+default_dialog;
+
Version 1.03b ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
main 2G 14382 37 28556 21 25957 23 39338 84 61565 12 213.1 1
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 825 5 +++++ +++ 863 5 858 6 +++++ +++ 909 5
main,2G,14382,37,28556,21,25957,23,39338,84,61565,12,213.1,1,16,825,5,+++++,+++,863,5,858,6,+++++,+++,909,5
Version 1.03b ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
main 2G 23665 46 29666 8 26182 1 39676 81 61329 12 177.6 0
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
--- lib/Bot/BasicBot/Pluggable.pm.orig>.2008-11-09 00:24:07.000000000 +0900
+++ lib/Bot/BasicBot/Pluggable.pm>......2008-11-09 00:29:47.000000000 +0900
@@ -130,6 +130,24 @@
use Bot::BasicBot::Pluggable::Module;
use Bot::BasicBot::Pluggable::Store::Storable;
use Bot::BasicBot::Pluggable::Store::DBI;
+use YAML;
+
+sub new_with_config {
+ my $class = shift;
--- lib/Bot/BasicBot/Pluggable/Store/DBI.pm.orig>.......2008-11-08 23:50:22.000000000 +0900
+++ lib/Bot/BasicBot/Pluggable/Store/DBI.pm>....2008-11-08 23:52:01.000000000 +0900
@@ -50,7 +50,7 @@
sub create_table {
my $self = shift;
my $table = $self->{table} or die "Need DB table";
- $self->dbh->do("CREATE TABLE $table (
+ $self->dbh->do("CREATE TABLE IF NOT EXISTS $table (
id INT PRIMARY KEY,
namespace TEXT,