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
I have tons of data where I have setups like this: | |
my %expected = ( country => ‘US’, state => ‘IL’, province => undef ); | |
my %expected = ( country => ‘CA’, state => undef, province => ‘ON’ ); | |
And then loop through and scrape them | |
if ( defined($value) ) { | |
$mech->scraped_id_is( $id, $value ); | |
} else { |
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
SELECT | |
COUNT(*), | |
DECODE( pubyear, NULL, 'Y', 'N') | |
FROM cadetail | |
WHERE | |
caid=:caid | |
GROUP BY | |
DECODE( pubyear, NULL, 'Y', 'N') |
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
" ~/.vim/after/syntax/perl.vim | |
let s:bcs = b:current_syntax | |
unlet b:current_syntax | |
syntax include @SQL syntax/sql.vim | |
let b:current_syntax = s:bcs | |
syntax region perlHereDocSQL start=+<<['"]SQL['"].*;\s*$+ end=+^SQL$+ contains=@SQL | |
syntax region perlHereDocSQL start=+<<['"]SQL_TEXT['"].*;\s*$+ end=+^SQL_TEXT$+ contains=@SQL | |
syntax region perlHereDocSQL start=+<<['"]__SQL__['"].*;\s*$+ end=+^__SQL__$+ contains=@SQL |
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
$ diff -u /usr/share/vim/vim74/syntax/sql.vim /usr/local/vim8/share/vim/vim80/syntax/sql.vim | |
--- /usr/share/vim/vim74/syntax/sql.vim 2014-06-10 01:56:13.000000000 -0500 | |
+++ /usr/local/vim8/share/vim/vim80/syntax/sql.vim 2016-09-13 15:13:49.202180373 -0500 | |
@@ -10,11 +10,8 @@ | |
" If the above exist, it will source the type specified. | |
" If none exist, it will source the default sql.vim file. | |
" | |
-" For version 5.x: Clear all syntax items | |
-" For version 6.x: Quit when a syntax file was already loaded | |
-if version < 600 |
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/share/vim/vim74/syntax/pod.vim 2014-06-10 01:56:13.000000000 -0500 | |
+++ /usr/local/vim8/share/vim/vim80/syntax/pod.vim 2016-09-13 15:13:49.192180372 -0500 | |
@@ -19,11 +19,8 @@ | |
" Remove any old syntax stuff hanging around (this is suppressed | |
" automatically by ":syn include" if necessary). | |
-" For version 5.x: Clear all syntax items | |
-" For version 6.x: Quit when a syntax file was already loaded | |
-if version < 600 | |
- syntax clear |
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
(blead) clifford:~/perlfromperlorg $ make malloc.o | |
clang -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_S | |
OURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c89 -O3 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings | |
malloc.c | |
malloc.c:257:4: error: "MYMALLOC is not defined" | |
# error "MYMALLOC is not defined" | |
^ | |
malloc.c:985:13: warning: implicit declaration of function 'malloced_size' [-Wimplicit-function-declaration] | |
*size = malloced_size(pv) + M_OVERHEAD; | |
^ |
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
(blead) clifford:~/perl $ cat foo.pl | |
my $i = 14; | |
sub announce { | |
print "i=$i\n"; | |
} | |
for $i (1..3) { | |
announce(); | |
} | |
(blead) clifford:~/perl $ perl foo.pl |
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; | |
require "t/test.pl"; | |
my $i = 2112; | |
ok( $i == 2112, '$i starts at 2112' ); | |
for $i (1..3) { | |
somesub(); | |
} |
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
package TW::Test2::Bundle; ## no critic ( Subroutines::ProhibitExportingUndeclaredSubs ) | |
# Stolen mostly from Test2::Bundle::More; | |
use strict; | |
use warnings; | |
=head1 DESCRIPTION |
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
while ( my ($key,$value) = Walk->sorted(%hash) ) { | |
... | |
} |