Skip to content

Instantly share code, notes, and snippets.

Now I'll take the liberty of adding my own tuppence (since I'm writing
from the other side of the Ocean I'll use an English idiom...). I am a
loyal and grateful user of CSNOBOL, and I belong to those users
(probably a tiny minority, but minorities are highly fashionable these
times) who are no professional programmers. I am a philologist, and the
combination of [C|]S*BOL and bash scripts solves about 100% of my
programming needs -- plus some TCL/TK when some graphics is required. I
also use Prolog for syntax issues. I study one new computer language
every summer, when I am free from lectures, so I came to know, after *C*
that I studied 20 years ago, Prolog, Perl, Icon, and Python. I even gave
#!/usr/local/bin/perl5.19.9
use strict;
use warnings;
use Carp;
$SIG{USR1} = sub { Carp::confess(@_); };
# use Net::DNS;
mysql> show tables;
+----------------------+
| Tables_in_asdmadmin |
+----------------------+
| 2009_incident |
| 2009_person |
| 2009_unit |
| 2010_incident |
| 2010_person |
We couldn’t find that file to show.
# 59 /data/apps/lib/perl5/site_perl/5.16.2/Dancer/Request.pm_153
# 57 /data/apps/lib/perl5/site_perl/5.16.2/DBIx/Class/SQLMaker.pm_247
# 37 /data/apps/lib/perl5/site_perl/5.16.2/DBIx/Class/Storage/DBI.pm_2395
# 36 /data/apps/lib/perl5/site_perl/5.16.2/DBIx/Class/ResultSet.pm_1272
# 30 /data/apps/lib/perl5/site_perl/5.16.2/x86_64-linux/DBI.pm_1293
# 27 /data/apps/lib/perl5/site_perl/5.16.2/x86_64-linux/DateTime.pm_435
# 18 /data/apps/lib/perl5/site_perl/5.16.2/Dancer/Request.pm_328
# 17 /data/apps/lib/perl5/site_perl/5.16.2/HTTP/Body.pm_107
# 12 /data/apps/lib/perl5/5.16.2/x86_64-linux/Encode.pm_129
# 10 /data/apps/lib/perl5/site_perl/5.16.2/Dancer/Request.pm_432
use Text::Levenshtein::Damerau 'edistance';
my $text = qq{
Linen Finish Cards
I'd like to be able to order higher-quality card stock options, namely linen stock, similar to many playing card brands.
};
my @text = split m/\s+/, $text;
#!/usr/bin/perl
package arrays2;
# inspired by http://blog.headius.com/2012/09/avoiding-hash-lookups-in-ruby.html ...
# attempt to use arrays for class instance data in Perl rather than hashes.
# this is done by scanning the bytecode, finding places where the '$self' hash ref
# is accessed, converting the names of the hash subscripts to numbers, changing the
# and hashes to arrays.
# for example, $self->{foo} might be changed to $self->[1].
#!/usr/local/bin/perl
use strict;
use warnings;
use Test::More;
use Acme::6502;
use lib '.';
#!/usr/bin/perl
use strict;
use warnings;
no warnings 'uninitialized';
use Data::Dumper;
use IO::Handle;
use WWW::Workflowy;
Macro::AdminToggle passes op=admin
Content::Admin handles that
it also takes plugin=whatever;method=whatever and looks up the class in the 'adminConsole' section of the config file
for the plugin and runs whichever method in there
it defaults to calling the GET specified 'method' in WebGUI::Admin, defaulting to 'www_view'
WebGUI::Admin implements most of the admin, except for extensions
currently, www_view in Admin.pm does, in part:
my $tmpl = WebGUI::Asset::Template->newById( $session, $session->setting->get('templateIdAdmin') );