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 -MData::Dumper -E 'use Moo; has "foo" => (is => "ro", default => sub { 0 }); has "bar" => (is => "ro", default => 0); say Dumper(main->new)' | |
$VAR1 = bless( { | |
'foo' => 0 | |
}, 'main' ); |
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
sub custom_commands { | |
my $self = shift; | |
return ($self->custom_commands, "helloworld"; | |
} | |
sub do_custom_command { | |
my $self = shift; | |
my $command = shift; | |
if ($command eq 'helloworld') { |
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
Couldn't instantiate component "MetaCPAN::Server::Controller::Login::Google", "Attribute (consumer_key) is required at /usr/local/lib/perl/5.14.2/Moose/Meta/Attribute.pm line 514. | |
Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0x61eee10)', 'Moose::Meta::Instance=HASH(0x61ef5d8)', 'MetaCPAN::Server::Controller::Login::Google=HASH(0x8690580)', 'HASH(0x841d9c8)') called at /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 525 | |
Class::MOP::Class::_construct_instance('Moose::Meta::Class::__ANON__::SERIAL::11=HASH(0x619a978)', 'HASH(0x841d9c8)') called at /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 498 | |
Class::MOP::Class::new_object('Moose::Meta::Class::__ANON__::SERIAL::11=HASH(0x619a978)', 'HASH(0x841d9c8)') called at /usr/local/lib/perl/5.14.2/Moose/Meta/Class.pm line 274 | |
Moose::Meta::Class::new_object('Moose::Meta::Class::__ANON__::SERIAL::11=HASH(0x619a978)', 'HASH(0x841d9c8)') called at /usr/local/lib/perl/5.14.2/Moose/Object.pm line 28 | |
Moose::Object::new('MetaCPAN:: |
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
# bad response in MetaCPAN::Web::Model::API->request | |
headers: $VAR1 = { | |
'Reason' => 'Broken pipe', | |
'URL' => 'http://127.0.0.1:5000/release/_search', | |
'Status' => 596 | |
}; |
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
... | |
[2012-10-14T21:18:39+00:00] INFO: Processing ubic_service[dancer] action install (play-perl::default line 50) | |
[2012-10-14T21:18:39+00:00] INFO: Processing ubic_service[dancer] action start (play-perl::default line 50) | |
[2012-10-14T21:18:39+00:00] INFO: Processing template[/etc/ubic/service/dancer] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/ubic/providers/service.rb line 22) | |
[2012-10-14T21:18:40+00:00] INFO: template[/etc/ubic/service/dancer] backed up to /var/chef/backup/etc/ubic/service/dancer.chef-20121014211840 | |
[2012-10-14T21:18:40+00:00] INFO: template[/etc/ubic/service/dancer] removed backup at /var/chef/backup/./etc/ubic/service/dancer.chef-20121014205215 | |
[2012-10-14T21:18:40+00:00] INFO: template[/etc/ubic/service/dancer] updated content | |
[2012-10-14T21:18:40+00:00] INFO: template[/etc/ubic/service/dancer] owner changed to 0 | |
[2012-10-14T21:18:40+00:00] INFO: template[/etc/ubic/service/dancer] group changed to 0 | |
[2012-10-14T21:18:40+00:00] INFO: template[/etc/ubic/service/dancer] mode ch |
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
mmcleric@mmcleric:~/build$ cat Devel-CheckLib-0.98/debian/rules | |
#!/usr/bin/make -f | |
%: | |
dh $@ | |
override_dh_perl: | |
dh_perl | |
dh_perldeps |
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 Ubic::Service::SimpleDaemon::WithMemoryUsage; | |
use strict; | |
use warnings; | |
use parent qw(Ubic::Service::SimpleDaemon); | |
use Ubic::Daemon qw(check_daemon); | |
use Ubic::Result qw(result); | |
sub custom_commands { | |
my $self = shift; |
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
mass(universe) = 3e52 kg # http://en.wikipedia.org/wiki/Observable_universe#Estimation_based_on_the_measured_stellar_density | |
mass(sun) = 2e30 kg | |
diameter(sun) = 1.3e6 km | |
radius(sun) = 6e5 km | |
orbit(earth) = 1.5e8 km | |
density(neutron star) = 4e14 * density(sun) # http://en.wikipedia.org/wiki/Neutron_star | |
mass(neutron star with the size of sun) = 2e30 * 4e14 = 8e44 | |
mass(neutron star with the size of earth orbit) = (1.5e8 / 6e5)^3 * 8e44 = 1.2e52 | |
orbit(mars) ~ 1.5 * orbit(earth) | |
mass(neutron star with the size of mars orbit) = 1.2 * 10^52 * 1.5**3 = 4.2e52 > mass(universe) |
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 R; | |
use Moose::Role; | |
has "foo" => ( | |
is => "ro", | |
required => 1, | |
default => 5 | |
); | |
package X; | |
use Moose; |
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
s kkq spbhjd ap hbqcp jhp ar pdph bidprs | |
|q nprafp pa rhepd algthdb abd hacjabhnkee | |
s//q spbhjd ap hbqcp jhp ar pdph bidprs | |
|q nprafp pa rhepd algthdb abd hacjabhn/ee | |
eval eval "q spbhjd ap hbqcp jhp ar pdph bidprs | |
|q nprafp pa rhepd algthdb abd hacjabhn" | |
eval eval "q {pbhjd ap hbqcp jhp ar pdph bidpr} |