- Don't optimize
- Don't optimize, I'm serious
- Don't optimize without benchmarking first
- Don't benchmark without profiling first
- See rule #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
== Methods | |
get_method($name) | |
-> method($name) | |
has_method($name) | |
-> has_method($name) | |
get_method_list - local names | |
-> method_names |
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
Role( | |
'R2.Role.Spinner', { | |
my: { | |
has: { | |
Spinner: { | |
is: 'roc', | |
isPrivate: true, | |
lazy: true, | |
builder: '_BuildSpinner' | |
} |
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
AUTHORDEPS=$(/var/lib/jenkins/perl5/perlbrew/perls/perl-5.14.1/bin/dzil authordeps --missing) | |
if [ ! -z "$AUTHORDEPS" ]; then | |
/var/lib/jenkins/perl5/perlbrew/perls/perl-5.14.1/bin/cpanm $AUTHORDEPS | |
fi | |
RUNTIMEDEPS=$(/var/lib/jenkins/perl5/perlbrew/perls/perl-5.14.1/bin/dzil listdeps --missing --author) | |
if [ ! -z "$RUNTIMEDEPS" ]; then | |
/var/lib/jenkins/perl5/perlbrew/perls/perl-5.14.1/bin/cpanm $RUNTIMEDEPS | |
fi | |
/var/lib/jenkins/perl5/perlbrew/perls/perl-5.14.1/bin/dzil clean | |
/var/lib/jenkins/perl5/perlbrew/perls/perl-5.14.1/bin/dzil build --no-tgz |
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 | |
use strict; | |
use warnings; | |
use Path::Class qw( file ); | |
my $file = shift; | |
if ($file) { |
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
(defun my-perltidy-command () | |
(concat "my-perltidy " | |
(cond | |
((buffer-file-name) (file-truename buffer-file-name)) | |
(t "")))) | |
(defun perltidy-region () | |
"Run perltidy on the current region." | |
(interactive) |
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
use v5.14; | |
use XML::SAX::Writer; | |
my $w1 = XML::SAX::Writer->new( | |
Output => '/tmp/writer-test1', | |
); | |
open my $fh, '>', '/tmp/writer-test2'; | |
binmode $fh, ':encoding(UTF-8)'; |
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 ruby | |
require 'csv' | |
require 'net/http' | |
require 'open-uri' | |
require 'optparse' | |
require 'uri' | |
fields = ['country_code', | |
'country_name', |
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 ruby | |
require 'csv' | |
require 'net/http' | |
require 'open-uri' | |
require 'optparse' | |
require 'uri' | |
fields = ['country_code', | |
'country_name', |
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 | |
use strict; | |
use warnings; | |
use Perl::Tidy 20120714; | |
use Path::Class qw( file ); | |
my $file = shift; |
OlderNewer