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
my $tmp = $heads{$hc}{subheads}; | |
foreach my $sc ( | |
sort { $tmp->{$a}{sort} <=> $tmp->{$b}{sort} } keys %$tmp | |
) { | |
next unless scalar @{$tmp->{$sc}{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
subset Direction of Str where any(@directions) { | |
has %!abbreviations = ...; | |
has %!opposite = ...; | |
method opposite {...} | |
} |
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 Templates; | |
my $code = sub { 'foo' }; | |
*simple = sub { return $code->(@_) }; | |
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
use strict; | |
use warnings; | |
use DBI; | |
my $dbh = DBI->connect('dbi:Pg:dbname=test', 'postgres', undef, { RaiseError => 1 }); | |
$dbh->do(q{DROP TABLE IF EXISTS test}); | |
$dbh->do(q{ | |
CREATE TABLE test ( | |
id INT NOT NULL PRIMARY KEY, |
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 strict; | |
use warnings; | |
package Bar; | |
use MyBase; | |
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
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm | |
index 8f6e190..f1050c2 100644 | |
--- a/lib/RT/Interface/Email.pm | |
+++ b/lib/RT/Interface/Email.pm | |
@@ -1069,6 +1069,9 @@ of the From (evaluated in order of Reply-To:, From:, Sender) | |
sub ParseSenderAddressFromHead { | |
my $head = shift; | |
+ use Data::Dumper; | |
+ $RT::Logger->error( Dumper $head ); |
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 5.010; | |
use strict; | |
use warnings; | |
my $rec = rec(); | |
$rec->alternative( 'XX', undef, 2 ); | |
while (1) { | |
say $rec->earleme_complete; | |
say $rec->exhausted? "exhausted" : "please continue"; | |
} |
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 5.014; | |
use strict; | |
use warnings; | |
use Marpa::R2; | |
use MarpaX::Repa::Lexer; | |
use MarpaX::Repa::Actions; | |
my %RE; | |
$RE{'WSP'} = qr{[ \t]}; |
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 | |
# By: Jeremiah LaRocco, Nikolay Mishin (refactoring) | |
# Use translate.google.com to translate between languages. | |
# Sample run: | |
#gtrans.pl --from en --to ru --text "This is a test" | |
use Modern::Perl; | |
use LWP::UserAgent; | |
use Getopt::Long; |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer