Perl Advent Calendar 2017 - Tiny Path Handling
Path::Tiny is a tiny abstraction around file paths that makes it very easy to manipulate them and perform common operations on them.
Recently I've started using Path::Tiny in preference to both the internal Perl operators for file manipulation and the other abstractions like File::Spec and Path::Class because it makes it really easy to handle common operations easily without making the kind of common mistakes that those other approaches often result in when you're coding quickly.
Perl Advent Calendar 2018 - Christmas Quoting
use B qw(perlstring);
say STDERR 'DEBUG: The next $childname is '. perlstring($childname)
Bless My Referents
Object-oriented programming in Perl is easy. Forget the heavy theory and the sesquipedalian jargon: classes in Perl are just regular packages, objects are just variables, methods are just subroutines. The syntax and semantics are a little different from regular Perl, but the basic building blocks are completely familiar.
Setting up a Perl Development Environment with plenv - xdg.me
This is a slightly modified copy of something I posted internally at work about setting up a development environment using plenv, which keeps your working Perl isolated from your system Perl. Many expert Perl developers already have some variation of this, but I’m posting it as a public service for people who’ve wanted this but never got around to it.
(I used to use perlbrew, but switched to plenv and haven’t looked back).
Regex Tutorial - Lookahead and Lookbehind Zero-Length Assertions
Lookahead and lookbehind, collectively called "lookaround", are zero-length assertions just like the start and end of line, and start and end of word anchors explained earlier in this tutorial. The difference is that lookaround actually matches characters, but then gives up the match, returning only the result: match or no match. That is why they are called "assertions". They do not consume characters in the string, but only assert whether a match is possible or not. Lookaround allows you to create regular expressions that are impossible to create without them, or that would get very longwinded without them.
Perl Advent Calendar 2017 - Mojolicious on the Command Line
Mojolicious provides a utility class, ojo, that allows us to leverage the power of Mojolicious from the command line:
perl -Mojo -E 'say g("http://goo.gl/EsGk3b")->text'
The -M flag tells perl to load the following module, so -Mojo, despite looking like a super secret Mojo flag to perl actually is a cheeky way of saying use ojo.
ojo provides a whole host of single letter functions that are shortcuts to Mojolicious utilities, allowing you to quickly do things like fetching urls, reading and writing files, encoding and decoding json, manipulating data structures and a whole host more.
Machine learning in Perl: Kyuubi goes to a (Model)Zoo during The Starry Night. | Sergey Kolychev [blogs.perl.org]
Hello all, this is a fourth blog post in the Machine learning in Perl series, focusing on the AI::MXNet, a Perl interface to Apache MXNet, a modern and powerful machine learning library.
David Golden - "Taking Perl to Eleven with Higher-Order Functions"
The Perl Conference 2018
Transformation helper function
Data::Fake
perldotcom/CONTRIBUTING.md at master · dnmfarrell/perldotcom · GitHub
Interested in writing an article for Perl.com? Perhaps you want to get the word out about your new startup, provide a tutorial on your favorite module, or have community news to share. This document is for you.
WWW::Mechanize Best Practices | i hack on things
Recently at $work we were discussing some of the behaviours of WWW::Mechanize when submitting forms. For instance, when you pass the fields parameter to the submit_form() method, Mechanize might take a very lax approach to submitting your data. Imagine the following form:
Perl Style
Changing en passant
/usr/man/man3/foo.1 changes to /usr/man/cat3/foo.1
($catpage = $manpage) =~ s/man(?=\d)/cat/;
Use foreach() Loops
@bindirs = qw( /usr/bin /bin /usr/local/bin );
for (@libdirs = @bindirs) { s/bin/lib/ }
Use Hashes of Records, not Parallel Arrays
for $his ($people{"Jason"}) {
$his->{AGE} = 23;
$his->{DAD} = "Herbert";
}
Some Common Unicode Problems and Solutions using Perl DBD::ODBC and MS SQL Server
What I expect from a Web Framework
The Web Framework Is Dead
The main problem with Web Frameworks is the "Web"-part.
You either have a good web framework (Catalyst, Dancer) which makes it hard to reuse your code in non-web-contexts (and there are a lot of those: cronjobs, tests, fixup scripts, daemons, importer & exporter, ...); or you have a "closed system" like Mojolicous or Ruby on Rails, which tend to include everything (i.e. they come with their own email-system, cron-replacement, event loop, ...) but sort of drift away from the main language and generate their own ecosystem / walled garden.
Stand Out as a Developer
He are the slides from my talk at #lpw2014 on how to conduct yourself as a Developer in an interview for further information please get in touch rick@eligo.co.uk
Speedometer - search.cpan.org
Speedometer : An easy interface to the Benchmark module to compare the performance of two Perl Files. I have written one small module(Speedometer.pm). need reviews. Thanks.