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
( perl5.12.3 -d:Trace t/013_complexType.t 2>&1) | grep -v '/home/scott/lib/' | sed -e 's!lib//SOAP!lib/SOAP!' > trace512.txt | |
( perl -d:Trace t/013_complexType.t 2>&1) | grep -v '/usr/local/lib/perl5/' > trace519.txt | |
# For example... the library paths to grep out vary (5.12.3 was installed in my home dir whereas 5.19.9 is in /usr/local). | |
kompare trace*.txt | |
That creates full execution traces, showing every line that Perl runs, while running the same unit test under two different versions of Perl. grep -v removes all lines traced from running installed modules so that only tracing from the unit test and non-installed module are left. kompare does a visual comparison on that. The point in the code where execution diverges for whatever reason will be clear in the visual diff. |
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
#!/bin/perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use B::Generate; | |
use Opcode; | |
#Asking to enter a number. |
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/perl | |
use strict; | |
use warnings; | |
# change these | |
my $pdf = '/path/to/pdf/file/filename_of_pdf_file.pdf'; | |
my $to_email = 'walt0132@gmail.com'; | |
my $email_subject = 'form completed'; |
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
mysql> select assetIndex.assetId, assetIndex.title, assetIndex.url, | |
-> assetIndex.synopsis, assetIndex.ownerUserId, assetIndex.groupIdView, | |
-> assetIndex.groupIdEdit, assetIndex.creationDate, assetIndex.revisionDate, | |
-> assetIndex.className, match (keywords) against ('+following-following*') as | |
-> score from assetIndex | |
-> where | |
-> -- isPublic = 1 and | |
-> ((match (keywords) against ('+following-following*' in boolean mode)) | |
-> -- and (lineage like '000001000002%') | |
-> and (className='WebGUI::Asset' or className='WebGUI::Asset::Event' or |
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
# uses https://github.com/mtve/bitcoin-pl for base58.pm, ecdsa.pm | |
# doesn't work. ecdsa.pm is flakey and usually doesn't create the same signature as the reference implementation. | |
use strict; | |
use warnings; | |
use Carp; | |
use Data::Dumper; | |
use Socket; |
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
Hello, | |
Per discussion between Cliff and I, I've put all of the raw bike count | |
data into github: | |
https://github.com/biketempe/DataAnalysis | |
Some of the code I've written for this project is in there, such as | |
the crash rate plot I did for this year, the SQL query used to fetch | |
the data, and the raw ADOT from that. |
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
#!/home/biketempe/bin/perl | |
#!/usr/local/bin/perl | |
use 5.019; | |
use strict; | |
use warnings; | |
use experimental 'postderef', 'signatures'; | |
use CGI; |
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 _autofield_processor { | |
my $self = shift; | |
my $cnf = shift || {}; | |
return sub { | |
my $name = shift; | |
my $display = shift; | |
$display = $name unless ($display); | |
my $Column = $self->AppDV->get_column($name) or return ''; | |
# no strict 'refs'; | |
# use Data::Dumper; warn 'ISA: ' . join ', ', @{ ref($self->AppDV) . '::ISA' }; # ->_virtual_columns(); |
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
in a method in a Content Handler: | |
my $cart = WebGUI::Shop->Cart->newBySession($session); | |
my $asset_id = $session->db->quickScalar("select assetId from sku where sku = ?", [ $session->request->param('sku')) ]); | |
my $product; | |
if( $asset_id ) { | |
$product = WebGUI::Asset::Sku::Product->newById($session, $asset_id); | |
} else { | |
$product = WebGUI::Asset::Sku::Product->new($session); |
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/perl | |
# creates reports on WebGUI (tm) helpdesks from the command line using $EDITOR | |
# supposed to automatically close them but doesn't do that yet | |
# todo: | |
# o. change ticket status to 'resolved' automatically, optionally | |
# o. do a git log to find the last hash and commit comment? | |
# o. <perlDreamer> start with /data/WebGUI/sbin/_utility.skeleton |