Skud's Friends' Journals http://use.perl.org/~Skud/journal/friends/ Skud's Friends' use Perl Journals en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:21:58+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 Skud's Friends' Journals http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~Skud/journal/friends/ Finally, some Test::Builder2 examples! http://use.perl.org/~schwern/journal/40528?from=rss <p>For my PDX.pm presentation tonight on <a href="http://github.com/schwern/test-more/tree/Test-Builder2">Test::Builder2</a> I threw together some quick examples of some of its killer features, in particular demonstrating changing how Test::Builder2 behaves using method modifiers and applying object roles.</p><p>First, demonstrating end-of-assert actions, there's <a href="http://github.com/schwern/test-more/blob/Test-Builder2/examples/TB2/lib/TB2/DieOnFail.pm">die on fail</a> but even cooler is <a href="http://github.com/schwern/test-more/blob/Test-Builder2/examples/TB2/lib/TB2/DebugOnFail.pm">DEBUG on fail</a>! That's right, run your test in the debugger and have it automatically set a breakpoint on a failure. How cool is that?</p><p>I'm sure somebody with better debugger foo than I can make it even cooler and stop at the top of the assert stack rather than inside DebugOnFail.</p><p>The second is reimplementing <a href="http://search.cpan.org/perldoc?Test::NoWarnings">Test::NoWarnings</a> safely. <a href="http://github.com/schwern/test-more/blob/Test-Builder2/examples/TB2/lib/TB2/NoWarnings.pm">TB2::NoWarnings</a> demonstrates hooking into the start and end of the test as well as safely altering the number of tests planned by trapping the call to set_plan.</p><p>You can safely use them all together, though its a crap shoot if DebugOnFail or DieOnFail will trigger first.</p><p>While roles and method modifiers are relatively new to the Perl community, using them in lieu of designing my own event system for TB2 has two great advantages. First, I didn't have to design and debug my own event system.<nobr> <wbr></nobr>:) Second, rather than having to learn the quirks of a one-off system, you learn the quirks of Mo[uo]se and then can apply that knowledge all over the place.</p><p>There's <a href="http://github.com/schwern/test-more/issues/labels/Test-Builder2">a pile of stuff to be done in TB2</a>, a lot of them are fairly small and self contained. Have a look. Patches welcome.</p> schwern 2010-09-09T08:33:42+00:00 journal Test::Builder2 at 10k Feet http://use.perl.org/~schwern/journal/40527?from=rss <p>Here's a diagram of the "flow" of assert results through Test::Builder version 1.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| foo.t |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp;.-------------.&nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp;.----------------.<br>&nbsp; &nbsp; &nbsp;| Test::More&nbsp; |&lt;---------&gt;| Test::Whatever |<br>&nbsp; &nbsp; &nbsp;'-------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'----------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;.---------------.&nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '----&gt;| Test::Builder |&lt;----'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TAP |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.---------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Test::Harness |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------'</tt></p></div> </blockquote><p>You write foo.t using Test::More and Test::Whatever. These both<br>use the same Test::Builder object. It spits out TAP which<br>Test::Harness converts into something human readable.</p><p>The big problem there is Test::Builder is monolithic. There's no<br>further breakdown of responsibilities. It only spits out TAP, and<br>only one version of TAP.</p><p>Here's what Test::Builder2 looks like:</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.-------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.----------------| foo.t |-------------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '-------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.------------.&nbsp; &nbsp; &nbsp;.----------------.&nbsp; &nbsp; &nbsp;.------------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Test::More |&nbsp; &nbsp; &nbsp;| Test::Whatever |&nbsp; &nbsp; &nbsp;| Test::NotUpdated |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '------------'&nbsp; &nbsp; &nbsp;'----------------'&nbsp; &nbsp; &nbsp;'------------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.----------------.&nbsp; &nbsp; &nbsp; &nbsp;.---------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'----------&gt;| Test::Builder2 |&lt;------| Test::Builder |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'----------------'&nbsp; &nbsp; &nbsp; &nbsp;'---------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.--------------.&nbsp; &nbsp;<nobr> <wbr></nobr>.-------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TB2::History |&lt;---| TB2::Result |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'--------------'&nbsp; &nbsp; '-------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.--------------------------.&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp;.---------------------.<br>&nbsp; &nbsp; | TB2::Formatter::TAP::v13 |&lt;-----'------&gt;| TB2::Formatter::GUI |<br>&nbsp; &nbsp; '--------------------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp;<nobr> <wbr></nobr>.-------------------------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; | TB2::Formatter::Streamer::TAP |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; '-------------------------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TAP |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.---------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Test::Harness |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| Pretty Pictures |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----------------'</tt></p></div> </blockquote><p>It starts out the same, foo.t uses a bunch of test modules<br>including Test::More and Test::Whatever using the same Test::Builder2<br>object, but it also uses Test::NotUpdated which is still using<br>Test::Builder. That's ok because Test::Builder has been rewritten in<br>terms of Test::Builder2 (more on that below).</p><p>Test::Builder2, rather than being a monolith, produces a<br>Test::Builder2::Result object for each assert run. This gets stored<br>in a Test::Builder2::History object for possible later use. It also<br>gets handed to a Test::Builder2::Formatter object, the default is<br>Test::Builder2::TAP::v13 which produces TAP version 13. This is fed<br>to a Streamer that prints it to STDOUT and STDERR which is read by<br>Test::Harness and made human readable.</p><p>Because Test::Builder2 is not monolithic, you can swap out parts. For<br>example, instead of outputting TAP it could instead hand results to a<br>formatter that produced a simple GUI representation, maybe a green<br>bar, or something that hooks into a larger GUI. Or maybe one that<br>produces JUnit XML.</p><p>Here's how Test::Builder and Test::Builder2 Relate.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.-----.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----.<br>&nbsp; &nbsp; &nbsp; &nbsp; | TB2 |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TB1 |<br>&nbsp; &nbsp; &nbsp; &nbsp; '-----'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.-------------.&nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.--------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-------------.<br>&nbsp; &nbsp; | TB2::Result |-------&gt;| TB2::History |&lt;--------| TB2::Result |<br>&nbsp; &nbsp; '-------------'&nbsp; &nbsp; &nbsp; &nbsp; '--------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.----------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-------------&gt;| TB2::Formatter |&lt;--------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '----------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.--------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Output |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '--------'</tt></p></div> </blockquote><p>Test::Builder and Test::Builder2 coordinate their actions by sharing<br>the same History and Formatter objects. If you call TB1-&gt;ok() it<br>produces a Result object which it hands to the History singleton and<br>the Formatter singleton. If you call TB2-&gt;ok() it produces a Result<br>object which it hands to the same History and Formatter objects.</p><p>This allows most of the Test::Builder code to remain the same while<br>still coordinating with Test::Builder2. It also allows radically<br>different builders to be made without Test::Builder2 dictating how<br>they're to work.</p><p>The downside is that roles applied to Test::Builder2 will not effect<br>Test::Builder. Because of this, Test::Builder may become more closely<br>coupled with Test::Builder2 in the future.</p><p>Diagrams by <a href="http://search.cpan.org/dist/App-Asciio">App::Asciio</a>.</p> schwern 2010-09-09T08:15:22+00:00 journal A month of Test::Builder2 http://use.perl.org/~schwern/journal/40517?from=rss <p>I've had <a href="http://www.perlfoundation.org/test_builder_2">a grant open for Test::Builder2</a> for, oh god over two years now. Since I started it, Perl 6 has had a release! I think its the second oldest running dev grant.</p><p>I've cleared the decks of other responsibilities and can dedicate September to, if not finishing, then at least releasing something people can poke at. First alpha release was supposed to be "two weeks after the start" ha ha ha! oh god. The design has evolved and simplified greatly in the intervening two years, but its time to get something the hell out the door. At least a <a href="http://github.com/schwern/test-more/tree/Test-Builder2">Test::Builder2</a> Star if you will.</p><p>There's critical components missing. There's no diagnostics, YAML or otherwise. The issues with nested asserts are still congealing. Plans are not enforced. Result objects are in the middle of being remodeled... again. But Test::Builder is using what parts of Test::Builder2 are usable. Multiple output formats and streams work. Asserts can be nested in the common, simple cases without having to fiddle with $Level. And you can hook into various events.</p><p>Step one is I'm going to seal up what's there, write docs where they're missing, and release something.</p><p>A release before October or the grant dies.</p> schwern 2010-08-28T04:08:39+00:00 journal Alien::SVN - new release, new management http://use.perl.org/~schwern/journal/40503?from=rss <p>Those of you still stuck using Subversion will be happy to find <a href="http://search.cpan.org/~mlanier/Alien-SVN-1.6.12.0/">a new release of Alien::SVN</a>. It drags it forward to 1.6.12, doesn't do much else.</p><p>Also, Alien::SVN has finally found a new manager! From out of the blue comes <a href="http://search.cpan.org/~mlanier/">Matthew Lanier</a> with a patch and the will and a PAUSE ID. He'll be taking care of things from now on. Its his first CPAN module, be gentle. Godspeed, Matthew.</p> schwern 2010-08-18T22:33:29+00:00 journal Test::Builder2::Design http://use.perl.org/~schwern/journal/40487?from=rss <p>In an effort to shed some light on what Test::Builder2 is about, I took a few hours and performed a brain dump about its goals and design. You can see the result in the new <a href="http://github.com/schwern/test-more/blob/Test-Builder2/lib/Test/Builder2/Design.pod">Test::Builder2::Design</a> document.</p><p>The key design goals are 1) that it has to work, 2) that it has to work everywhere and 3) that it has to test everything. This throws out a lot of 98% solutions.</p> schwern 2010-08-10T02:31:05+00:00 journal Method::Signatures returns! 5.12, func() and fast! http://use.perl.org/~schwern/journal/40474?from=rss <p>Chip submitted a minor performance patch to Method::Signatures today. That drove me to push out <a href="http://github.com/schwern/method-signatures/blob/v20100730/Changes">a new release</a> making it friendly to 5.12 and adding func() for non methods!</p><p> &nbsp; &nbsp; &nbsp; &nbsp; func hello(:$greeting = "Hello",<nobr> <wbr></nobr>:$place = "World") {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print "$greeting, $place!\n";<br> &nbsp; &nbsp; &nbsp; &nbsp; }</p><p> &nbsp; &nbsp; &nbsp; &nbsp; hello( place =&gt; "Earth" );</p><p>For those who don't know, one of the neato features of <a href="http://search.cpan.org/perldoc?Method::Signatures">Method::Signatures</a> is that it can <a href="http://search.cpan.org/~mschwern/Method-Signatures-20090620/lib/Method/Signatures.pm#Aliased_references">alias references</a> to make working with references less of a trial:</p><p> &nbsp; &nbsp; &nbsp; &nbsp; func popn(\@array, $howmany) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return splice @array, -$howmany;<br> &nbsp; &nbsp; &nbsp; &nbsp; }</p><p> &nbsp; &nbsp; &nbsp; &nbsp; my @stuff = (1,2,3,4,5);<br> &nbsp; &nbsp; &nbsp; &nbsp; my @last_three = popn(\@stuff, 3); # 3,4,5<br> &nbsp; &nbsp; &nbsp; &nbsp; print @last_three;</p><p>It does this with the amazing <a href="http://search.cpan.org/perldoc?Data::Alias">Data::Alias</a> module. Unfortunately, 5.12 broke its black magic and its non-trivial to fix. Method::Signatures now makes Devel::Alias an optional dependency. If its available, it'll use it. Otherwise, no aliasing for you.</p><p>But that's ok, because perl5i makes working with references enjoyable. And while perl5i is adding its own simple signatures, they're forward compatible with Method::Signatures! They play together, so if you want perl5i and the full power of Method::Signatures you can have them.</p><p> &nbsp; &nbsp; &nbsp; &nbsp; use perl5i::2;<br> &nbsp; &nbsp; &nbsp; &nbsp; use Method::Signatures;</p><p> &nbsp; &nbsp; &nbsp; &nbsp; func echo($message is ro) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; say $message;<br> &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>Just make sure you load MS after perl5i. The last one loaded wins.</p><p>Finally, I was comparing Method::Signatures with MooseX::Method::Signatures and made a disturbing discovery. I always new MooseX::Method::Signatures would have a performance penalty, it does more checks than Method::Signatures, I just didn't realize how bad it was.</p><p>Here's comparing an empty signature: <code>method foo() {}</code>.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rate&nbsp; &nbsp; MMS&nbsp; &nbsp; &nbsp;MS&nbsp; &nbsp; Std<br>MMS&nbsp; &nbsp; 3207/s&nbsp; &nbsp; &nbsp;--&nbsp; -100%&nbsp; -100%<br>MS&nbsp; 1498875/s 46644%&nbsp; &nbsp; &nbsp;--&nbsp; &nbsp; -1%<br>Std 1508351/s 46940%&nbsp; &nbsp; &nbsp;1%&nbsp; &nbsp; &nbsp;--</tt></p></div> </blockquote><p>That's showing MooseX::Method::Signatures is 450x slower than either Method::Signatures or a normal method call creaking out a mere 3500 method calls per second as compared to the 1.5 million it should be doing. And that's for a method with an empty signature!</p><p>To be clear, that's the speed of calling a method, not compiling them.</p><p>Here's one comparing a simple signature that requires a check, so MS can't optimize it away: <code>method foo($arg!) { return $arg + 1 }</code> That's a required positional argument.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rate&nbsp; &nbsp; MMS&nbsp; &nbsp; &nbsp;MS&nbsp; &nbsp; Std<br>MMS&nbsp; &nbsp; 2928/s&nbsp; &nbsp; &nbsp;--&nbsp; -100%&nbsp; -100%<br>MS&nbsp; &nbsp;983127/s 33481%&nbsp; &nbsp; &nbsp;--&nbsp; &nbsp; -2%<br>Std 1005357/s 34240%&nbsp; &nbsp; &nbsp;2%&nbsp; &nbsp; &nbsp;--</tt></p></div> </blockquote><p>3000 method calls instead of a million.</p><p>Now I'm the first to counter arguments bemoaning method call overhead. Usually it doesn't matter. Usually the extra cost of calling a method and checking arguments is insignificant compared to what that method actually does. And MooseX::Method::Signatures has features Method::Signatures does not, most significantly type checking. But my god! Three orders of magnitude of performance lost! And its not even using the extra MMS features. That's just too much.</p> schwern 2010-07-31T00:49:55+00:00 journal Perl 6 Is The Language Your Language Could Smell Like http://use.perl.org/~schwern/journal/40472?from=rss <p><a href="http://www.youtube.com/watch?v=owGykVbfgUE">Hello programmers</a>. Look at your code, now at Perl 6, now back at your code, now back at Perl 6! Sadly, your code is not written in Perl 6. But if you use <a href="http://rakudo.org/announce/rakudo-star/2010.07">Rakudo Star</a> then Perl 6 is the language your code could be written in!</p><p><a href="http://github.com/rakudo/star/downloads">Now Microsoft scented!</a></p> schwern 2010-07-29T19:24:09+00:00 journal On tour: Open Source Bridge, YAPC::NA and other fun things http://use.perl.org/~jarich/journal/40456?from=rss <p> After the fun I had at OSCON last year, it was no effort at all for pjf to convince me to spend June and July in the USA this year, conferencing. </p><p> <b>Portland, Oregon</b> </p><p> I arrived at midnight on the 31st May and was met at the airport by Schwern, pjf and Nadia, who took me onwards to donuts and pies. Having traveled for something like 30 hours at the time I was rather wiped out and probably not as appreciative of this as I should have been, but I soon got to bed and slept very soundly. </p><p> Schwern warned me ahead of time that he was going to be a busy, and thus less friendly host, and that he and his housemate Nick had been a little guested-out due to an almost endless procession of house-guests. He must have exaggerated. Between them, Schwern and Nick took us to the local farmers' market, to a parade, to numerous dinners and drinks out, and more. Schwern helped us get to the conference location, and also accompanied me home most nights. </p><p> <b>Open Source Bridge</b> </p><p> The conference was Open Source Bridge; and it is unlike any community-run conference I've ever attended. It was extremely professionally run, with copious amounts of information, high quality keynotes and speakers, an excellent feedback system... big and little things that the conferences I've been involved with are still struggling with after 6+ years and this was only OSB's second year! My talk was very well received, I was spoiled for choice for every single session and the unconference at the end really just capped things off. It was good to see so many familiar faces, and I caught up with some Australians, and Australian-expats that I hadn't seen for quite some time. </p><p> If you get to choose the geek conference you go to next year; make it Open Source Bridge! </p><p> <b>More Portland, Oregon</b> </p><p> The following two weeks, Sherri and Christie kindly hosted Paul and I. When I ran into some personal issues, I could not have hoped for more generous hosts. Sherri made sure I got out of bed each day, and many days Schwern and others made sure I got out of the house. Apparently we were lovely guests, but really Sherri and Christie were excellent hosts. Sherri cooked copious amounts of extremely yummy vegan food, and let me eat it for breakfast and lunch. They took us strawberry picking, to a great Ethiopian restaurant, and took me to an amazing vegan cafe for breakfast on my last day in Portland. </p><p> <b>YAPC::NA, Columbus, Ohio</b> </p><p> Next up was YAPC::NA in Columbus, Ohio. Very much like YAPC::EU I felt completely at home in this crowd. It was great to know that I could walk into any conference talk and have a pretty good idea of the topic matter. It did feel a little strange that many of the big names, and the people I view as particularly important knew me, but many of the regular people neither recognised me nor my "handle", but I suspect I shouldn't have been so surprised. </p><p> My tutorial was very well received, I met a whole lot more people, learned a bunch of new things, and got all fired up about finishing writing our Enterprise Perl course and documenting perl5i. It was really, really awesome to catch up with Karen, Jesse and Piers again, specifically. </p><p> <b>Milwaukee, Wisconsin</b> </p><p> Milwaukee wasn't originally on my list of places to visit, however a friend online invited me to drop by and visit, and I had a few days free, so why not? My friend, Jordi, and Sarah, invited me to stay with them. Jordi is an astrophysicist who spent some of the first afternoon explaining to me how it is that neutrinos do in fact mutate. Which was actually much more interesting than I think he thought I'd find it. </p><p> We walked the riverfront, found great restaurants, saw the music festival from afar, went to a nearby Strawberry festival (yum!) and spent time playing with the newly arrived arduino set. I've been wishing I could get involved with arduino for years, but also never been into electronics. Jordi and I worked through the basic tutorials with his board, and I found the whole thing very cool! </p><p> To top the trip off, Jordi and Sarah invited me to hang out for drinks with some of their colleagues one evening (they all work at the nearby university). I had a thoroughly good time, and felt I fitted in just fine, even though most of them use Python.<nobr> <wbr></nobr>:) After drinks there was dinner (with 3 free drinks for the ladies) and then Tron. Ah, good times. </p><p> <b>New York City</b> </p><p> My next scheduled stop was the big apple. While at YAPC::NA I discovered that a fellow Melbourne Perl Monger (Patrick) had recently moved to New York, and he insisted that we should stay with him. I had some minor adventures getting to his place, but received a very warm welcome, and was glad to take a cold shower. That was the first summer-like weather I'd seen for my whole trip thus far. </p><p> While in New York, I explored the New York Public Library (and saw the Rose Room), had a tour of Google with lunch (thank you to Tom Limoncelli), caught the Staten Island ferry, saw the Statue of Liberty, walked down Wall Street (and saw the cordoned-off outside of the New York Stock Exchange), checked out the Empire State building, the Sex Museum, Times Square and the Rockerfella(?) building. Much touristy stuff. </p><p> Patrick and Helen were lovely hosts, and it wasn't their fault at all that the temperature refused to drop to something reasonable for the whole time I was in town.<nobr> <wbr></nobr>;) </p><p> <b>Minneapolis, Minnesota</b> </p><p> My last touring destination was Minneapolis where Steven Levine arranged an amazing weekend of activities to keep me busy. I did my best, but arrived with the start of a sore throat and fever. I arrived on a Thursday afternoon and first up was dinner with Matt and Deb followed by a scotch tasting. Even though I'm not a scotch drinker, I wished I was well enough to participate, but having already had some paracetamol, I dared not. It seemed like a lot of fun though. </p><p>On Friday, Steven took me out to a favourite breakfast location (which we did every day, actually), and then later to a wedding of two of his dear friends (Denise and Jim), neither of whom I knew. Both bride and groom sought me out and told me how glad they were that I could come. There was shape-note singing, morris dancing and contra-dancing and a fantastic time was had by all - especially me! I also got to meet more lovely people including a sweet, sweet gentleman by the name of Mal. </p><p> On Saturday we drove off to a little township which has a cafe in a cave, explored some antique stores and enjoyed the river before going to the arts museum (very cool) and then saw a documentary about Joan Rivers (fascinating) and finishing with dinner at Pizza Luce's (with a fun story attached). </p><p> Sunday was July 4th. So we started the day with a traditional block party at Matt and Deb's with a children's bike parade (or race), more morris dancing, a jazz band, singing and much neighbourly entertainment. I also managed to squeeze in a chance to run off and meet another friend, Yevgeny, for coffee where we talked about scuba diving and the Con I hadn't made time to attend). We ended the day with dinner with Michael and daughters followed by fireworks. By this point I was taking painkillers every 4 hours just to be able to talk, so I was getting a bit worried. </p><p> Monday we'd planned to go to the Taste of Minnesota festival, but I asked instead if I could go to a doctor (after talking with my travel insurance people first). The doctor was lovely, ran some tests and advised me to take various over-the-counter drugs. They helped immensely, and made it possible for me to attend the sea shanty singing that evening (although the drugs weren't quite good enough to allow me to sing). </p><p> The next day was a day of sad farewells. I felt so welcome and adopted into Steven's crowd that I would have loved to stay in Minneapolis for another month! However, it was time for my next adventure, so Steven drove Mal and I to the airport and he headed off to work. Mal I and had some minor fun getting through security, caught our planes in different directions, and thus far, lived happily ever after. </p><p> Two weeks on, and I might be over whatever it was that made me sick, too. </p> jarich 2010-07-21T01:30:30+00:00 journal "def" or "func"? http://use.perl.org/~schwern/journal/40444?from=rss <p>perl5i 2.3.0_01 now has <a href="http://twitter.com/perl5i/status/18391811333">basic methods and subroutine signatures</a> with code basically lifted straight from <a href="http://search.cpan.org/dist/Method-Signatures-Simple">Method::Signatures::Simple</a>. <a href="http://search.cpan.org/dist/MooseX-Declare">MooseX::Declare</a> got me addicted, now I want them everywhere.</p><blockquote><div><p> <tt>use perl5i::2;<br> &nbsp; <br>def add($this, $that) {<br>&nbsp; &nbsp; return $this + $that;<br>}<br> &nbsp; <br>method new($class: %args) {<br>&nbsp; &nbsp; return bless \%args, $class;<br>}<br> &nbsp; <br>my $echo = def($arg) { return $arg };</tt></p></div> </blockquote><p>Its alpha for two reasons. First, I don't have time right now to really thoroughly test it, but I really want it.</p><p>Second, overriding "sub" is hard. <a href="http://search.cpan.org/dist/signatures">Its been done</a> but its a bit twitchy. Defining a new keyword is easy(er). So what should that keyword be? I've come up with two that have good arguments. "def" and "func". Both are short. "def" has the benefit of being used by other programming languages a Perl programmer is likely to encounter and not hate (Python, Ruby, Scala, Groovy). "func" is nice because it pretty clearly means "function" whereas "define" is a bit ambiguous.</p><p>perl5i currently does both. Only one will survive in version 3 (the other will be deprecated). Before you comment on which is your favorite, try it for a little bit. I found a difference between what I thought I like and what I actually use.</p> schwern 2010-07-13T00:06:57+00:00 journal Where The Hell Is Test::Builder2? http://use.perl.org/~schwern/journal/40421?from=rss <p>My progress and communication about the Test::Builder2 grant has been nothing short of appalling. There is a sort of herky-jerky progress where I figure out a design problem, push the code forward, then remember a use-case that throws a wrench in the whole design and the whole thing comes to a screeching halt again.</p><p>At the QA hackathon we elegantly solved the problem of things like <a href="ahref=">die-on-fail and Test::NoWarnings</a> but then ran afoul of things like Test::Warn and Test::Exception which runs tests inside of tests but those aren't actually part of the test stack.</p><p>Confused? I'll post more about it another time. Point is, TB2 continues to move forward, its just that there's long periods of rumination between sprints of development. And I get distracted by other projects. At this rate I'll be collecting Social Security before I collect the second half of the grant. I really want TB2 to happen, but something decisive has to be done. I work best with hard deadlines, so the plan is to clear a month for working mostly on TB2. A lot of the wibbling is trying to come up with the most elegant solution, but I usually have a less than elegant way to solve it and move forward. If its between an elegant TB2 that doesn't exist and a less elegant TB2 that does, well, go with the one that exists. With the way my schedule is looking, that will probably be mid-August to mid-September. If that doesn't produce an alpha, then I'll kill the grant.</p><p>That doesn't mean TPF gets nothing for your money. Chunks of TB2 can be harvested to improve TB1. Specifically, the TB2 formatting and history objects. The TB2 formatter makes the guts of TB1 cleaner, and it also allows it to produce something other than TAP. Used together, history and formatter allows non-Test::Builder based test frameworks to work together with Test::Builder providing even more flexibility. This is <a href="http://github.com/schwern/test-more/blob/Test-Builder2/lib/Test/Builder.pm">already done in the TB2 branch</a>.</p><p>Looking at the grant deliverables, most of it is done:</p><blockquote><div><p> <tt>* Split up global shared Test resources into individual objects<br>&nbsp; &nbsp; * The test counter<br>&nbsp; &nbsp; * The output filehandles<br>&nbsp; &nbsp; * The plan<br> &nbsp; <br>* Allow hooks for global beginning and end of test functions.<br>&nbsp; &nbsp; * Ensure multiple hooks "stack"<br>&nbsp; &nbsp; * die on fail<br>&nbsp; &nbsp; * debug on fail<br> &nbsp; <br>* Hooks for global beginning and end of test actions<br>&nbsp; &nbsp; * Example: A safer Test::NoWarnings<br>&nbsp; &nbsp; * Example: Don't cleanup temp files on failure so they can be debugged<br> &nbsp; <br>* Allow for test output other than TAP<br> &nbsp; <br>* Allow another Test::Builder-like module to work in the same process<br>&nbsp; as Test::Builder (for example, sharing the counter).<br> &nbsp; <br>* Rewrite Test::Builder in terms of Test::Builder2.</tt></p></div> </blockquote><p>Here's what's not complete:</p><blockquote><div><p> <tt>* Split up localizable behaviors into objects<br> &nbsp; <br>* Allow individual test modules to locally override Test::Builder2 behaviors<br> &nbsp; <br>* Allow test modules to globally override Test::Builder2 behaviors<br>&nbsp; &nbsp; * How the plan works</tt></p></div> </blockquote><p>Since I'm not writing to the letter of the law, <a href="http://github.com/schwern/test-more/issues/labels/Test-Builder2">there's more than that to be done before release</a>, but the project does move.</p> schwern 2010-06-27T19:16:09+00:00 journal The Post-YAPC Plan http://use.perl.org/~schwern/journal/40420?from=rss <p>I spent most of YAPC::NA mildly sick, sleep deprived and writing talks. Each of those things alone isn't so bad, but put all together meant I had time and energy enough to do my talks, discuss with people after, and that's about it. As a result, I was kind of dead in the head most of the time and didn't do a whole lot of interaction with people. I didn't feel like I got the most out of the one opportunity a year I get to hang out with huge gobs of Perl folk.</p><p>One of the things which I wanted to do at YAPC was get <a href="http://gitpan.integra.net/">gitpan</a> restarted. It can run right now, but the code is a mess and needs to be babied. It needs a rewrite. That rewrite was supposed to happen at YAPC but see above. I'm doing that now, using MooseX::Declare, perl5i and Path::Class just to mess around with them seriously. Also log4perl, which I'm finally learning a decade late. Its fun, far more pleasant than knocking it together without, once you learn to cope with Moose's idiosyncrasies. Better to learn the quirks of one complete system than nine incomplete ones.</p><p>That's what's absorbing my time right now. After that I want to add subroutine signatures to perl5i and the <a href="http://piratepad.net/ULub7Vjsgn">&#252;ber file and directory objects</a>. They were supposed to be in, at least as a prototype, by YAPC but that didn't work out. Using MooseX::Declare, Path::Class and perl5i together has me drooling for them.</p><p>Will Coleda, representing the TPF, found me at YAPC and mercifully did not break my legs. We hashed out a plan to make a last stab at Test::Builder2 before calling the grant done. That's not going to happen until August, I'll post about that later.</p><p>Oh, and I have a talk to do at OSCON about how <a href="http://www.oscon.com/oscon2010/public/schedule/detail/14113">the world is going to end in 2038</a> assuming <a href="http://www.youtube.com/watch?v=ZW2qxFkcLM0">2012 doesn't claim the prize first</a>. And a two part <a href="http://opensourcebridge.org/proposals/420">Git tutorial for Drupal programmers</a> that I'm developing into a commercial class. And two paid clients to keep happy.</p><p>One thing I *don't* have to worry about is MakeMaker. Gird your loins, MakeMaker has provisionally been handed off to Matt Trout. Maybe I need to worry about it more...</p> schwern 2010-06-27T18:34:30+00:00 journal Object::ID - A unique object identifier for any object http://use.perl.org/~schwern/journal/40340?from=rss <p>Something Perl's OO has been missing has been a reliable way to identify an object. Is $this the same as $that? Not asking if it contains the same information, but is it a referent to the same object? Have we seen it before? When I alter $this will I also be changing $that?</p><blockquote><div><p> <tt>package Foo;<br> &nbsp; <br>use Object::ID;<br> &nbsp; <br>...write the class however you want...</tt></p></div> </blockquote><p>Really, HOWEVER YOU WANT! Inside out, outside in, code refs, regexes, globs, Moose, Mouse... Call the constructor whatever you like, add in a DESTROY method. Doesn't matter, it'll work.</p><blockquote><div><p> <tt>my $id&nbsp; &nbsp;= $obj-&gt;object_id;<br>my $uuid = $obj-&gt;object_uuid;</tt></p></div> </blockquote><p> <code>object_id()</code> is a cheap, process-specific identifier. <code>object_uuid()</code> is a bit more expensive on first call (it has to generate the <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Uuid">UUID</a>, about 30% slower) but it should be universally unique across machines and processes.</p><p>That's great for YOUR objects, but what about everyone else? You can either inject the Object::ID role one class at a time...</p><blockquote><div><p> <tt>package DateTime;<br>use Object::ID;<br> &nbsp; <br>my $date = DateTime-&gt;now;<br>say $date-&gt;object_id;</tt></p></div> </blockquote><p>or you can load UNIVERSAL::Object::ID and every object has it. EVERY OBJECT! Even things you don't realize are objects.</p><blockquote><div><p> <tt>use UNIVERSAL::Object::ID;<br> &nbsp; <br># Regexes are objects<br>say qr/foo/-&gt;object_id;<br> &nbsp; <br># Loading IO::Handle turns all filehandles into objects<br>use IO::Handle;<br>open my $fh, "foo/bar";<br>say $fh-&gt;object_id;</tt></p></div> </blockquote><p>But OH GOD UNIVERSAL! Well, use at your own risk. Its handy to use in your own programs and private libraries. Or you can use <a href="http://search.cpan.org/dist/Method-Lexical">Method::Lexical</a> and apply it lexically.</p><p>Why not just use the object's reference address? Well, as people implementing inside-out objects discovered, they're not unique. They're not thread safe, and worse they're not even unique for the life of the process. Perl will reuse the reference of a destroyed object. Observe:</p><blockquote><div><p> <tt>{<br>&nbsp; &nbsp; package Foo;<br> &nbsp; <br>&nbsp; &nbsp; sub new {<br>&nbsp; &nbsp; &nbsp; &nbsp; my $class = shift;<br>&nbsp; &nbsp; &nbsp; &nbsp; return bless {}, $class;<br>&nbsp; &nbsp; }<br>}<br> &nbsp; <br>for(1..3) {<br>&nbsp; &nbsp; my $obj = Foo-&gt;new;<br>&nbsp; &nbsp; print "Object's reference is $obj\n";<br>}</tt></p></div> </blockquote><p>Run that and you should get the same reference, three times, for three different objects.</p><p>And then there's the problem of string overloaded objects. You have to be careful to always use Scalar::Util::refaddr or overload::StrVal.</p><p>It turns out inside-out objects have nearly the same problem, and 5.10.0 introduced field hashes to solve that. rjbs explains the pain of all this at slide 120 in his excellent <a href="http://www.slideshare.net/rjbs/perl-510-for-people-who-arent-totally-insane">5.10 For People Who Aren't Totally Insane</a>. You can read the <a href="http://search.cpan.org/dist/Hash-Util-FieldHash">gory details of field hashes</a> but it comes down to this: in 5.10 you can A) get a process unique, thread safe identifier for an object and B) you can store it in hash such that it gets destroyed when the object is destroyed. Perfect!</p><p>Because of this, if you look inside Object::ID you'll see there's not a lot to it. It makes a field hash to store the IDs in, a state variable to hold an ID counter, and then just accesses the field hash.</p><blockquote><div><p> <tt>use Hash::Util::FieldHash qw(fieldhash);<br>fieldhash(my %IDs);<br> &nbsp; <br>sub object_id {<br>&nbsp; &nbsp; my $self = shift;<br> &nbsp; <br>&nbsp; &nbsp; state $last_id = "a";<br> &nbsp; <br>&nbsp; &nbsp; return $IDs{$self}<nobr> <wbr></nobr>//= ++$last_id;<br>}</tt></p></div> </blockquote><p>No scary black magic (beyond what's inside fieldhash). Its so simple, which is why it works with everything.</p><p>Now, I didn't come up with this implementation. I just laid out the requirements and <a href="http://profvince.com/">Vincent Pit</a> filled in the blanks. I was only vaguely aware of field hashes, Vincent made the connection. Thank you VPIT!</p><p>Practical applications? Honestly, I'm not sure. I needed it as a shortcut for expensive object equality checks in perl5i. Maybe some of the OO theorists out there can fill this part in. Let me know what you might use it for.</p><p>Possible extensions? Well... with some tweaking Object::ID can be used as a universal object registry. Not only can you ask "does the object associated with this ID still exist" but field hashes provide the ability to get the object associated with an ID. It would only work on objects that have had their ID asked of them, and thus registered with the field hash, but how else would you have the ID? Is this useful? Is this a security hole? I dunno, but it would be easy.</p> schwern 2010-05-02T17:17:01+00:00 journal Facebook privacy - Instant personalisation and connections http://use.perl.org/~pjf/journal/40325?from=rss <p> <b>Facebook privacy - Instant personalisation and connections</b> <br> Facebook has been announcing a number of changes recently, many of which will impact your privacy. While you may not have seen them hit your account yet, they will almost certainly do so soon. </p><p> <b>Connections</b> <br> In the past, Facebook had a whole bunch of free-form fields for things like location and interests. You could put practically anything you wanted in these, and show them to your friends. For things like interests, there was some basic search features, but they weren't very advanced. </p><p> These free-form fields are now changing into "connections". Like existing fan pages, connections represent an actual relationship, rather than just text. Also, just like fan pages, they're <i>public</i>, so you can see all the people who like <a href="http://www.facebook.com/pages/Cooking/113970468613229">cooking</a>, or <a href="http://www.facebook.com/pages/Mushrooms/108398075857821">mushrooms</a>. The new connection pages include extra information including text from wikipedia, and an automatic search through both your friends and all public posts to look for content related to that subject. The same applies for your location (hometown and current), your employers, and education! </p><p> From an application developer's standpoint, this is a great change. The existing free-form fields were next to useless. From a privacy standpoint, this is an interesting change. It's great to be able to find friends who share your common interests, but because connections are <i>public</i>, you're not just revealing that information to your friends. You're revealing it to the whole wide world. For any user who just accepted the defaults the defaults, I now know the city where you live, who you work for, where you went to school, and what you enjoy doing, in addition to who your friends are, and what you look like. </p><p> Luckily, you don't have to convert your interests and locations to connections. However if you don't, those parts of your profile will simply cease to exist. Facebook would <i>really</i> like you to convert to connections, and you'll get a scary looking message about parts of your profile being removed if you don't. Of course, not all of your interests will map to new connections, and those that don't will be discarded in any case, so whatever you do you <i>will</i> be losing information, including potentially the dates of your employment and education. For me, that's not a big deal, but it might be for you. If you <i>do</i> want to continue listing your interests in a free-form and private fashion, I recommend you simply add them to your "about me/bio" section. </p><p> If you <i>do</i> convert your interests (and Facebook will ask you to do so sooner or later) then keep in mind that these (along with your existing fan pages) are <i>very</i> public. Your friends, family, employer, potential employer, applications, websites, enemies, and random people on the Internet will all be able to see them. If you don't want that, your only recourse is to remove those connections. </p><p> In theory, you can also edit your birthday, and change your age to under 18, which <a href="http://www.facebook.com/help/?faq=17134">limits what Facebook will publicly disclose about you</a>, although your connections are still very broadly published. Unfortunately, as I discovered the hard way, you can only transform from an adult into a minor <i>once</i>, so if you've edited your birthday in the past you may not be able to change it now. In fact, if you've already converted to the new connection system, then your birthday will no longer show up as something you <i>can</i> edit, so make sure it's set to a date you're happy with before going through the conversion. </p><p> <b>Instant Personalisation</b> <br> Facebook is rolling out changes to allow websites to automatically access your "publicly available information", which includes name, profile picture, gender, friends, and "connections". </p><p> What's that, I hear you ask? Are these the same connections that I just added to my profile during the conversion process? They sure are! I bet you just <i>love</i> the idea that when you visit a website, they not only <i>automatically</i> know your name, your location, and your friends, but also a detailed list of your interests, activities, education, and employer! </p><p> Luckily, you can turn instant personalisation off. There's a new ticky box on the <a href="http://www.facebook.com/settings/?tab=privacy&amp;section=applications">applications and websites privacy page</a>. For some users, this is on by default, and for others it's off, and I'm not yet sure how that's determined. If it's not ticked now, and you later go through the connections conversion process, then I recommend you go back to double check it's still unchcked. </p><p> Having ensured that instant personalisation is disabled, I bet you're feeling pretty safe. However there's a great little clause if you read the <a href="http://www.facebook.com/help/?faq=17105">fine print</a>: <i>To prevent your friends from sharing any of your information with an instant personalization partner, block the application...</i> </p><p> That's right, your friends can share your information. This actually isn't anything new; applications your friends have installed <a href="http://pjf.id.au/blog/?position=599">can also view your information</a>, but you probably don't want them sharing your info with the instant personalisation sites either. </p><p> So, in addition to unticking a box, you probably want to visit the applications <a href="http://www.facebook.com/help/?faq=17105">listed in the FAQ entry</a> and block them, too. </p><p> While you're at it, I recommend you look at your <a href="http://www.facebook.com/editapps.php?v=allowed">list of authorised applications</a> as well, and remove any ones that you no longer need. It's <i>very</i> easy to authorise an app these days (in fact, commenting or liking this blog post will do so!), so you might be surprised to see what's there. </p><p> Finally, if you want to protect against accidental leakage of your profile information, consider <i>logging out of Facebook</i> before browsing other websites. Sure, this may be a pain in the arse, but Facebook can't share your information if you're not logged in. </p><p> <b>Conference Talk at OS Bridge</b> <br> I'll be <a href="http://opensourcebridge.org/proposals/425">talking more about Facebook privacy</a>, along with some practical demonstration of tools, at the <a href="http://opensourcebridge.org/">Open Source Bridge</a> conference from the 1st-4th June 2010. </p> pjf 2010-04-23T06:31:18+00:00 journal OMG UNICORNIFY::URL!!! &lt;3 http://use.perl.org/~schwern/journal/40289?from=rss <p><a href="http://unicornify.appspot.com/avatar/e55e0ec3c00f834d78fbdddeaa36e308?s=128">OMG! A UNICORN PONY FOR MEEEE!!!</a></p><p>You can get 1 2 wth <a href="http://github.com/schwern/gravatar-url/blob/master/lib/Unicornify/URL.pm">Unicornify::URL</a>!! Here's a program to do it at the command line.</p><blockquote><div><p> <tt>use Acme::Pony;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bUf<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Fybuf<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FyBuFFYbU<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FfyBUFfYbUff<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YBuffybuFfyBuF<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fYbUffYBUfFYbUff<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YbUFfYBuffYBuFFYBu<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FFybUffYBUffYBUfFYb<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UffYbUFfyBUffYBuFfyB<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UFFybUfFYBuffYbUFF<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ybUfFyBuFfyBufFy<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BuffYBufFyBUfFYB&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uffY<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bUffybuffyBUFfyBuf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FYBuFfy<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BuFFybUFFyBUffyBuFFYbuffybUf&nbsp; &nbsp;fYbUfFYBu<br>&nbsp; &nbsp; fFYB&nbsp; &nbsp;uFFyBufFyBUfFYbufFYbUFFYbUFfyBufFYBufFYBu<br>&nbsp; &nbsp;FFyBufFyBUffYBufFYbUffYBUFfYBUFFyBuFfYbUFFybUffYBU<br> &nbsp; ffyBU fFYbuffYbUffybuffYbuFfYbuFFyBuFFyBUfFybufFYbUf<br>fYbUF&nbsp; &nbsp; &nbsp;fybUFfYBuffybuFfyBuFFYBuffYBUFFybuffybUffYBu<br>&nbsp; fFYBuf&nbsp; &nbsp; fyBuFFyBufFyBUffYBufFYbufFyBUFfybUFfYbuffyb<br>&nbsp; &nbsp;uFfyB&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UffYBUfFybUfFYbuFfYBUFfYbUffYBuffybuFf<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;yBuFFY&nbsp; &nbsp; &nbsp;BuffYBUFFybuffybUffYbufFYb<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ufFyb&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UFfybufFYBuffybufFyb<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UffYb&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UffybUFfY buffybuF<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fybUf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fyBuffy BUFfYbuF<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FYbUF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fyBuffYbuFFyBUFf<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ybUf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fybu&nbsp; ffYb UffybuF<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fYbu&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ffYB&nbsp; UFFy&nbsp; BuFFYB<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UfFy&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BuF&nbsp; &nbsp;fybU&nbsp; &nbsp;ffYB<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Uff&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Ybu<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fFyb&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uFf<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YBUF<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F<br> &nbsp; <br>yBuFFYBUfFy</tt></p></div> </blockquote><p>&lt;3 k thx bye!!1!11!!!</p> schwern 2010-04-01T22:51:34+00:00 journal Some Facts About Schwern http://use.perl.org/~schwern/journal/40271?from=rss <p><a href="http://opensourcebridge.org/">Open Source Bridge</a> requested that I improve <a href="http://opensourcebridge.org/users/111">my bio</a>, so I decided to share some facts about myself...</p><blockquote><div><p>Schwern has a copy of Perl 6, he lets Larry Wall borrow it and take notes.</p><p>Schwern once sneezed into a microphone and the text-to-speech conversion was a regex that turns crap into gold.</p><p>Damian Conway and Schwern once had an arm wrestling contest. The superposition still hasn&#8217;t collapsed.</p><p>Schwern was the keynote speaker at the first YAPC::Mars.</p><p>When Schwern runs a smoke test, the fire department is notified.</p><p>Dan Brown analyzed a JAPH Schwern wrote and discovered it contained the Bible.</p><p>Schwern writes Perl code that writes Makefiles that write shell scripts on VMS.</p><p>Schwern does not commit to master, master commits to Schwern.</p><p>SETI broadcast some of Schwern&#8217;s Perl code into space. 8 years later they got a reply thanking them for the improved hyper drive plans.</p><p>Schwern once accidentally typed &#8220;git pull &#8212;hard&#8221; and dragged Github&#8217;s server room 10 miles.</p><p>There are no free namespaces on CPAN, there are just modules Schwern has not written yet.</p><p>Perl's threads are implemented with a single strand of Schwern's hair.</p><p>"Schwern" cmp "Chuck Norris" will cause Perl to segfault rather than try to compare them.</p><p>Schwern&#8217;s tears are said to cure cancer, unfortunately his Perl code gives it right back.</p></div></blockquote> schwern 2010-03-26T03:45:05+00:00 journal Ada Lovelace Day (Part 2) http://use.perl.org/~pjf/journal/40267?from=rss <p> <b>Ada Lovelace Day (Part 2)</b> <br> Today is Ada Lovelace continuation day; a day for continuing blog posts reflecting on the awesome contributions of women to science and technology. Here is my continuation from my <a href="http://pjf.id.au/blog/?position=602">previous post</a> of my personal heroines. </p><p> <b> <a href="http://www.chesnok.com/">Selena Deckelmann</a> </b> (<a href="http://twitter.com/selenamarie">@selenamarie</a>)<br> Wow. Selena. Where do I start? Selena does <i>everything</i>. She runs the <a href="http://opensourcebridge.org/">Open Source Bridge</a> conference, the <a href="http://pugs.postgresql.org/pdx">Portland Postgres User Group</a> (PDXPUG) with <a href="http://twitter.com/gorthx">@gorthx</a>, the Code'n'Splode tech group, and gives talks at <a href="http://www.igniteportland.com/">Ignite Portland</a> and numerous conferences worldwide. She has an amazing garden, keeps chickens about as well as I do, and boundless energy. </p><p> And I mean <i>boundless</i> energy. Selena seems to be awake before dawn, will party into the night, and seems to always have half a dozen projects on the go at once. Selena coming off a trans-pacific flight is only slightly less bouncy than normal. As if that wasn't enough, she's also an amazing host, and was kind enough to let Jacinta and myself crash at her place last year when we were visiting Portland. </p><p> Selena is also an amazing public speaker, a great storyteller, knows more about databases than anyone else I know, and went to Nigeria to help combat election fraud. She is well-versed in awesome. </p><p> Selena is responsible for convincing me that I <i>really</i> need a pull-up bar at home. </p><p> <b> <a href="http://martian.org/karen/">Karen Pauley</a> </b> (<a href="http://twitter.com/keiosu">@keiosu</a>)<br> I first met Karen at a <a href="http://sydney.pm.org/">Sydney Perl Mongers</a> meeting a few years back. Karen is the Steering Committee Chair of the <a href="http://www.perlfoundation.org/">Perl Foundation</a>, and is quite frankly one of the most friendliest and interesting people I've ever met. </p><p> Karen is responsible for making sure things get done, and a lot of her work is behind the scenes. In fact, I think it would be correct to say that Karen is awesome at meta-work; she has the rather unenviable task of encouraging technically minded people to do productive things. Her talk at the <a href="http://www.osdc.com.au/">Open Source Developers Conference</a> on managing volunteers was brilliant. </p><p> I'm personally indebted to Karen for listening to all my crazy ideas, sending me the most amazing Christmas Cards from Japan, providing fashion advice, making me laugh (a lot!), being an awesome person to hang out with at conferences, and for standing in the hot Australian sun with a digital SLR. If you've seen <a href="http://www.flickr.com/photos/keiosu/sets/72157622897942910/">photos of me draped over a nice looking sports car</a>, then that's probably Karen's work.<nobr> <wbr></nobr>;) </p><p> I aspire to become anywhere near as good a conversationalist as Karen. </p><p> <b> <a href="http://twitter.com/mjmojo">Mary Jane "MJ" Kelly</a> </b> (<a href="http://twitter.com/mjmojo">@mjmojo</a>)<br> I met Mary Jane completely by chance at OSCON last year. At the time, I thought that she was pretty darn awesome. What I didn't realise is that she's much more awesome than I first thought. </p><p> Mary Jane is full of ideas. <i>Cool</i> ideas. Ideas which involve industrial cutting lasers, 3D printers, quilts, robots, fractals, untraditional business cards, topography, steampunk, using tattoos for social hacking, and adventures! </p><p> Better still, MJ doesn't just have great ideas, she implements them too! I'm hugely looking forward to seeing her talk at this year's OSCON, which is all about hacker spaces and building awesome things. </p><p> Mary Jane is actively involved in computer security, particularly in the field of anti-fraud technologies in on-line gaming. MJ founded the <a href="http://girlsintech.net/category/seattle/">Girls In Tech Seattle chapter</a>, and organised the 2007 Northwest Security Symposium. </p><p> MJ has a wicked sense of humour that never fails to make me smile, shares my love of costumes and cool events, and is solely responsible for my knowledge of waffle-makers. </p><p> <b>Honourable mentions</b> <br> There are a lot more women in technology who have been hugely influential in my life, either by changing the way that I think, or from teaching me amazing new things. In particular, I'd love to give a special mention to <a href="http://twitter.com/lhawthorn">Leslie Hawthorn</a>, <a href="http://twitter.com/sulagarcia">Sulamita Garcia</a>, <a href="http://twitter.com/emmajanedotnet">Emma Jane Hogbin</a>, <a href="http://twitter.com/allisonrandal">Allison Randal</a>, <a href="http://twitter.com/audreyt">Audrey Tang</a>, <a href="http://twitter.com/justjenine">Jenine Abarbanel</a>, <a href="http://twitter.com/akkakk">Akkana Peck</a>, <a href="http://identi.ca/pfctdayelise">Brianna Laugher</a>, <a href="http://twitter.com/br3nda">Brenda Wallace</a>, <a href="http://twitter.com/puzzlement">Mary Gardiner</a>, <a href="http://twitter.com/kattekrab">Donna Benjamin</a>, <a href="http://twitter.com/raena">Raena Jackson-Armitage</a>, <a href="http://twitter.com/piawaugh">Pia Waugh</a>, <a href="http://twitter.com/stokely">Sarah Stokely</a>, <a href="http://twitter.com/rickybuchanan">Ricky Buchanan</a>, <a href="http://twitter.com/lindsey">Lindsey Kuper</a>, and <a href="http://twitter.com/lizhenry">Liz Henry</a>. </p><p> I don't have an Ada Lovelace Day list on twitter, but I do have my <a href="http://twitter.com/pjf/techwomen">techwomen</a> list, which includes all of the above and more. </p> pjf 2010-03-25T14:36:27+00:00 journal Ada Lovelace Day (Part 1) http://use.perl.org/~pjf/journal/40264?from=rss <p> <b>Ada Lovelace Day (Part 1)</b> <br> Today is <a href="http://findingada.com/">Ada Lovelace day</a>; a day for reflection on the awesome contributions of women to science and technology. Today, I would like to pay tribute to some of my personal heroines, and as you'll see, there's quite a few of them. I've tried to list them in roughly chronological order. </p><p> <b> <a href="http://katherinephelps.com/">Dr Katherine Phelps</a> </b> <br> In my early teens I had a Commodore 64 with a 1200/75 baud modem, which I used to access local bulletin board systems (BBSes). This was the start of what I would discover was a lifelong joy of communicating with people from behind the safety of a monitor, or in the case of the C64, a television. </p><p> Katherine, and her husband Andrew, ran one such local BBS called the Rainbow Connection, and I met them both at a BBS meet-up. Katherine seems to have a knack for encouraging younger people to excel, and taught me the basics of HTML, and even had me editing web-pages for <a href="http://glasswings.com.au/">Glass Wings</a> and other websites. In fact, it's due to Katherine that I got my first exposure to the Internet and Internet programming. </p><p> Today, Katherine is still prominent in the fields of storytelling, interactive fiction, game-writing, and comedy. Katherine is almost wholly responsible for me getting into Japanese Animation, by showing me an nth generation, unsubtitled, videotape of <a href="http://en.wikipedia.org/wiki/My_Neighbour_Totoro">My Neighbour Totoro</a>, with herself and Andrew providing a very amusing translation as we watched.<nobr> <wbr></nobr>;) </p><p> <b> <a href="http://infotrope.net/">Kirrily 'Skud' Robert</a> </b> (<a href="http://twitter.com/Skud">@Skud</a>)<br> I met Skud though Katherine, also while I was still at high school. At the time I was living with my parents as a quiet, introverted geek. All of my friends, and most of the technical people I knew, were also quiet and introverted types. </p><p> Skud pretty much shattered all the stereotypes I had for what it was to be technical. She was outgoing, opinionated, pushed boundries, made things happen, was extremely good with people, had unconventional social views, and was <i>way</i> cooler than me. She still is. </p><p> Skud has had a massive influence on my life. She started her own business (Netizen) and wrote a set of course manuals on Perl. Some years later, that same writing would form the basis of <a href="http://perltraining.com.au/">Perl Training Australia</a>'s own <a href="http://perltraining.com.au/notes.html">course manuals</a>. Skud has been highly influential in the Geek Feminism movement (which has both a <a href="http://geekfeminism.org/">blog</a> and <a href="http://geekfeminism.wikia.com/wiki/Geek_Feminism_Wiki">wiki</a>), and gave a critical keynote entitled <a href="http://infotrope.net/blog/2009/07/25/standing-out-in-the-crowd-my-oscon-keynote/">standing out in the crowd</a> at OSCON 2009. </p><p> Often I feel that whenever I discover a new experience, it's actually something Skud has been doing for at least a decade. I still fondly remember Skud giving me advice on etiquette at a rather incredible FOSS party a few years back. In fact, <a href="http://geeketiquette.com/">etiquette</a> is another thing Skud is rather good at.<nobr> <wbr></nobr>;) </p><p> Skud continues to be one of my most favourite people in the world, and I was delighted to have the chance to visit her in San Francisco last year after OSCON. My personal motto, never refuse an adventure, was directly lifted from one of Skud's new year's resolutions. </p><p> <b> <a href="http://use.perl.org/~jarich/journal/">Jacinta Richardson</a> </b> (<a href="http://twitter.com/jarichaust">@jarichaust</a>)<br> Once I got to university, I started an anime club. One year, working behind the desk, and with my hair in pigtails and balloons, a girl approached and asked about the club. At the end of the conversation she said "I might come back later", which when advertising an anime club usually translates to: "I think you're a complete freak, and I hope to never see you again in my life." </p><p> To cut a long story short, she came back, and she was studying Software Engineering.<nobr> <wbr></nobr>;) </p><p> Jacinta was a receipient of a 2008 White Camel Award for outstanding contributions to the Perl community. Along with running <a href="http://perltraining.com.au/">Perl Training Australia</a>, she's also one of the original organisers of the <a href="http://www.osdc.com.au/">Open Source Developers' Conference</a>, has helped with countless <a href="http://pm.org/">Perl Mongers</a> meetings, and is largely responsible for our <a href="http://perltraining.com.au/tips/">Perl Tips</a> newsletter. </p><p> Jacinta also does a lot of behind the scenes work which is not easily seen. She has contacts in practically every user group in Australia, so Jacinta is often involved when organisation of Australian-wide events are needed. At conferences she's often giving up her own time to coach nervous speakers (including me!). In fact, Jacinta even had a hand in one of my most favourite talks of all time, <a href="http://twitter.com/webchick">@webchick</a>'s <a href="http://webchick.net/files/women-in-floss.pdf">Women in FLOSS</a>. </p><p> <b> <a href="http://tradeskill.blogspot.com/">Emily Taylor</a> </b> (<a href="http://twitter.com/Domino_EQ2">@Domino_EQ2</a>)<br> I met Emily shortly after a phone-call from Jacinta saying that I was going to have a late addition to my Perl class. Emily arrived at lunchtime, and started as a bright, attentive student; she quickly caught up with the rest of the class, showed genuine talent, and was working on advanced exercises in no time. </p><p> However what got me really excited was <i>why</i> Emily was learning Perl. By afternoon of the first day, I was calling back to the office to say that our new student was <i>awesome</i>, and she was going to apply for the position of head tradeskill developer for Everquest II (EQ2). However I think it two at least two weeks until I discovered she was in my guild! </p><p> Now, Emily is indeed the grand tradeskill developer for EQ2. She has an <a href="http://tradeskill.blogspot.com/">awesome blog on MMO tradeskilling</a> and MMOs in general. More importantly for Ada Lovelace day, she's also an active contributor to the <a href="http://gamersinreallife.wordpress.com/">Gamers In Real Life (GIRL)</a> blog. </p><p> Emily presently lives in San Diego, where she distracts me yearly with photographs from Comic-con, and disagrees with me about what breakfast spreads are appropriate on toast. </p><p> <i>Stay tuned for tomorrow's continuation of this post.</i> </p> pjf 2010-03-24T11:59:48+00:00 journal The Basic Unit of Bug Report Frustration http://use.perl.org/~schwern/journal/40260?from=rss <p>I submitted a proposal to OSCON called "How To Report A Bug" about the social issues involved in reporting and accepting bug reports. Its still pending, but its caused me to do a little writing for it. I came up with this introduction which I feel sums up the problem well. I'm also tickled that one measures bug report frustration in bags of shit.</p><blockquote><div><p>Developers often treat bug reports like someone dumping a bag of shit on your doorstep, ringing the bell and telling you to clean it up. That's not what they are. A bug report is someone pointing out that there's some shit on your doorstep, they stepped in it, and maybe it should be cleaned up.</p><p>Either way, nobody likes stepping in shit. And nobody likes cleaning up shit. So the whole interaction starts off on the wrong foot, perhaps the one covered in shit. Your job, as developer or as reporter, is to deliberately steer it back to being a positive one where the developer wants to fix shit and the reporter wants to continue to report shit.</p></div></blockquote> schwern 2010-03-22T23:57:26+00:00 journal Gone http://use.perl.org/~Ovid/journal/40243?from=rss <p>Like many others, I'm no longer posting here very much. You'll find my new technical journal at <a href="http://blogs.perl.org/users/ovid/">blogs.perl.org</a>. It's much shinier.</p><p> <a href="http://siteanalytics.compete.com/use.perl.org/">As you can see, use.perl visits have been dropping for a while</a> (blogs.perl.org is too new to show up on that search) and the <a href="http://use.perl.org/">front page of use.perl has been sadly neglected</a>. As for blogs.perl.org, after an initial rough start, <a href="http://blogs.perl.org/users/adam_kennedy/2009/12/migrating-from-useperlorg-to-blogsperlorg.html">plenty</a> <a href="http://blogs.perl.org/users/thefinalcut/2009/12/first-post-on-the-shiny-new-onion.html">of</a> <a href="http://blogs.perl.org/users/limbicregion/2009/11/goodbye-useperlorg-hello-blogsperlorg.html">people</a> are switching over and are very happy with the shiny.</p><p>I have fond memories of use.perl.org, but it's just too old and out-of-date. Come on over to our new platform and look around. Plus, <a href="http://github.com/davorg/blogs.perl.org/issues">tell us what you want changed about it</a>. (To be fair, while I was involved in the project to get it launched (mostly kibitzing and asking why things were stalled -- I'm such a marketroid<nobr> <wbr></nobr>:), the hands-on work was Dave Cross, Aaron Crane and the wonderful folks at <a href="http://www.sixapart.com/">SixApart</a>.)</p> Ovid 2010-03-14T08:02:43+00:00 journal Gamers over 30 and the South Australian elections http://use.perl.org/~jarich/journal/40198?from=rss <p>South Australia is about to have its state elections. The incumbents have already attempted to ban anonymous public comment on the elections and now are making a big deal about computer gamers. </p><p> South Australian Attorney-General Michael Atkinson (think Minister for Justice/Law) has so far successfully blocked a R-18 classification for computers games in Australia. Our highest rating is MA (15+). The effect of this is that some games which ought to be R-rated are allowed to be sold to teenagers, some games get "modified" to make them appropriate and yet other games are not available at all (legally). We do have R-ratings for movies and some other media; but to allow it for games requires approval from all the Australian states; and Atkinson has been holding out. </p><p> In response, a political party called gamers4croydon have formed with the purpose of trying to get this rating approved if they win. Hooray! In the mean time, a gamer apparently stuffed a threatening letter under the Atkinson's family home at 2am some nights back. While I don't approve of such behaviour, I was baffled to hear that this makes Atkinson <a href="http://www.abc.net.au/news/stories/2010/02/16/2820606.htm">"feel that my family and I are more at risk from gamers than we are from the outlaw motorcycle gangs who also hate me and are running a candidate against me."</a> Gamers are scarier than bikies? I haven't read the note; perhaps that one is. </p><p> So that's a bit of background. Then last night I read <a href="http://www.theaustralian.com.au/news/opinion/hells-bells-these-boys-need-to-act-their-age/story-e6frg73f-1225828907947">an astonishingly condescending article about gamers</a>. This was written by Caroline Overington who has won the Walkley Award twice for investigative journalism, but that's no excuse for the tripe she's trotted out. </p><p> Let's see what she has to say: </p><blockquote><div><p> [A]nyone over the age of 30 who spends any time deep in some sagging sofa, console in one hand, the other down the front of their pants, imagining themselves to be a combatant in some pretend city, is lame. </p><p> Anyone who has an avatar -- a dinky little cartoon version of oneself, bearing a physique that is in every way discordant with the physique of an actual gamer -- is major-league lame. </p><p> I know what you're thinking. Gamers, who cares? They don't participate in life in any meaningful way. As a rule, they don't even have jobs. With their wet hands and their weak chins, they'd never get through an interview. </p></div> </blockquote><p> I get that this is supposed to be funny, but it failed. Not because I don't have a sense of humour; but because telling me that there aren't any females in gaming isn't funny, it's marginalising. Telling me that gamers are so socially inept that they can't have relationships is not funny, it's marginalising. Telling me that gamers fail at life isn't funny, it's belittling. </p><p> Most of the gamers I know have jobs, have spouses and maybe children, are active in a number of different communities and are reasonably physically active. This shouldn't be surprising because the <a href="http://www.tamaleaver.net/2008/10/29/interactive-australia-2009-report/">Interactive Australia 2009 Report</a> tells us that the average Australian gamer age is 30 and that 68% of Australians play computer or video games. If all gamers over the age of 30 were as lame as Overington says, we'd have serious problems. </p><p> Spending your non-work hours playing computer games late into the night is certainly not a worse pursuit than spending them watching TV. At least with games you're actually required to do some thinking, rather than having it all be passive consumption. Sure there are probably hundreds of "better" things to do with your free time, but there are worse things too. </p><p> If Overington wanted to make a subtle dig at Atkinson's refusal to talk about 18+ ratings; I'd have expected her to poke some fun at the idea that computer gamers are more scary than bikies! As it is, I cannot make any reasonable guess as to what motivated this attack. </p> jarich 2010-02-20T08:20:35+00:00 journal Barbie tries a career as a Computer Engineer http://use.perl.org/~jarich/journal/40188?from=rss <p> Mattel ran a competition for the public to pick Barbie's next career. There were about 5 options to choose from. Barbie's career as selected by girls around the world was News Anchor; however the popular vote was for Computer Engineer so they've done both. </p><p> A good write up with links to more has been done on the <a href="http://geekfeminism.org/2010/02/12/barbie-becomes-a-computer-engineer/">Geek Feminism Wiki</a>. </p><p> Disappointingly, yesterday the BBC published an article <a href="http://news.bbc.co.uk/2/hi/uk_news/magazine/8517097.stm">criticising Computer Engineer Barbie's appearance and practicality</a>. My response, which may be too long to appear in full in their comments field, is below. </p><blockquote><div><p> I say "Good on Mattel!" Whether or not the current female geek population ever played with Barbie dolls is irrelevant. By having a Barbie doll looking like a confident IT geek, that's one more message to our children (both boys and girls) that girls can grow up to be into computers too. We need more messages like that, because all the literature I've read says that the numbers of women getting into, and staying in IT (in Europe, the USA and Australia at least) is dropping. If it's a men's playground now, what's it going to be when there's less than 10% women in it? How about 5%? </p><p> If you look at the careers section for IT in a Malaysian newspaper, you'll find that it's 50% women represented. If you talk to Malaysian business people you'll find that most of them take it for granted that women will apply for IT jobs and get them. No surprise then that there's more than 40% women in technical professions over there, and it's growing. Malaysian women have the same pressure to be beautiful as the English do; and it appears they carry this into their IT roles even more than we do and they've found a way to make it all work. </p><p> On the other hand, over here in the first world, our whole culture around who goes into IT is weird. We continue to perpetuate the unattractive stereotype that IT is full of pimply male teenagers who have no social skills; despite having thousands of high profile, attractive men with very good social skills in technical leadership positions we could point to. We continue to criticise, as unrealistic, any portrayal of geek women which shows them as being feminine, attractive, self-confident etc despite numerous women in IT being all those things and more (go read some of the profiles from the 2009 Ada Lovelace day). </p><p> There seems to be a fair amount of retrospective retribution going on: "I had to suffer and struggle to get accepted; so anyone coming after me should have to too!" That's not right. If we want more women in IT; we should promote the good bits, and actually try to be realistic about the bad bits rather than talking them up all the time. (As a woman in IT who goes to conferences, I do know that there are bad bits, but I also know that the creepy guys + those with no social skills is still probably less than 15% of the population). </p><p> So thank you Mattel for making it just that much easier to talk to girls about going into computers! </p></div> </blockquote> jarich 2010-02-17T01:18:51+00:00 journal Test::Class::Most http://use.perl.org/~Ovid/journal/40148?from=rss <a href="http://blogs.perl.org/users/ovid/2010/01/-package-sometestclass.html">Test::Class::Most</a>. Ovid 2010-01-31T19:25:10+00:00 journal Testing with PostgreSQL http://use.perl.org/~Ovid/journal/40145?from=rss <p>My new personal project has a PostgreSQL database. <a href="http://blogs.perl.org/users/ovid/2010/01/testing-postgresql.html">Here's how I'm handling testing</a>.</p> Ovid 2010-01-30T16:22:57+00:00 journal Kuala Lumpur, Day 0 http://use.perl.org/~pjf/journal/40139?from=rss <p> <b>Kuala Lumpur, Day 0</b> <br> After seventeen hours of travel, I've finally checked into my hotel in Kuala Lumpur. I'm here with Jacinta, and we're teaching Perl to a client next week, but we've arrived early to do some sight-seeing... <i>and because we're insane</i>. </p><p> Actually, it only <i>feels</i> like we're insane, because we've only just got back from LCA2010. In reality, going to KL so quickly means that we actually have something one of us might care to label as "a holiday". There's no chance of tacking a holiday on the end: we need to get home in order to clear the mail, launder clothes, and squish an entire month's worth of social engagements into three days before KiwiFoo, and then me spending two weeks in Sydney. </p><p> That's right. Four weeks of travel, with only three days at home. Maybe I am insane after all. </p><p> Kuala Lumpur is just like I remember it. Hot, humid, friendly people, and cheap, delicious food. Almost everything can be ordered with peanuts, and fried anchovies. </p><p> Today I feel like telling stories, so I'm going to recount the happenings of my day. Now would be a good time to get a mug of hot chocolate, or maybe skip to someone else's blog entry. I don't mind. </p><p> The trip was not a difficult one, but not an uneventful one either. It started with being picked up by the least competent taxi driver in Melbourne. Or more correctly, <i>not</i> being picked up. The taxi was clearly visible in the street, about a block or two away, and spent most of its time doing U-turns and driving back-and-forth outside a small group of houses. I suspect they were using a GPS navigation system, and it didn't know our street numbers. Trying to flag the taxi down with a high-powered diving torch, the sort which is capable of stunning small fish from a mile away, didn't seem to help either. </p><p> The torch did attract the attention of a completely different taxi, who, sensing that we were now quite late for our flight check-in, decided to take the most leisurely approach to driving that I've ever seen. From our conversation, I discovered the driver never gets speeding tickets, but was once fined <i>four times</i> in one day because his car had insufficient velocity. Since our car speed to be travelling down the highway with all the speed of warm molasses, I could understand why. </p><p> The flight to KL was <i>lovely</i>. Through good planning, a lot of luck, and er, an aggressively unscheduled seat change, both Jacinta and myself were able to secure three seats each to ourselves. As someone who is used to sleeping on airplanes, this is the height of luxury. During the eight hour flight, I slept for seven, and without the need for sleeping tablets. I awoke feeling relaxed and refreshed. </p><p> Getting to the hotel wasn't hard, but inefficient. The plan was to catch a bus to KL Sentral, a train to Putrajaya, and then use the hotel's complimentary shuttle from there. It now appears that we could have caught a train directly from the airport to Putrajaya, saving considerable time and some money. Still, the trip to Sentral resulted in some spiffy weekly tickets which looked like they'd be useful in travel. </p><p> Calling the hotel from the train, I asked if we could get a pick-up from Putrajaya. They seemed uncertain, and after some to-and-fro, they admitted that the shuttle doesn't go to Putrajaya station, despite it being the nearest major public transport centre. They <i>do</i> however go to Kuala Lumpur proper (where we were just coming from), and a shopping centre or two. </p><p> As it happens, I now discover the hotel's bus seems to be the transportation equivalent of "scattered showers": not in your area, and not when you care. So rather than using the hotel bus, we were introduced to the public bus network. </p><p> Putrajaya's public bus network doesn't work the same way as other bus networks do. There's a big bus station, with lots and lots of bays and busses, but the goal of the drivers is to collect as few passengers as possible. This is primarily done by locking the bus, sneaking out, having a smoke for half an hour, and then dashing back into the bus and driving off as quickly as possible before anyone spots you. Other tricks include waving passengers away when they try to enter, or telling passengers you don't leave until <i>much</i> later, and then driving off as soon as they turn their backs. In fact, should a bus foolishly leave its doors open for more than a few moments, it is almost invariably becomes jam-packed with passengers. All the busses seem to go to the same places anyway, just in a different order, and catching <i>any</i> bus is better than being outside in the heat. </p><p> The hotel itself is super-fancy. The room comes with bath-robes, slippers, a fruit-bowl, a fancy room configuration and furniture. Heck, even the bath-tub has its own phone, just in case you decide you need another bottle of champagne. The hotel seems to be filled with government officials and businessmen; not surprising, given the location in the heart of KL's government and technology district. I've never really liked fancy hotels; when travelling I prefer a more organic experience, but I think I've finally become to understand them. The people who frequent these hotels, almost by necessity, need to have so much money that the prices actually seem reasonable. For example, I'm eating a meal right now that costs the equivalent of dinner for <i>six people</i> on the streets of KL. That's an expensive meal, but it's still on the cheap side compared to what I'd be paying for the same meal in Australia. </p><p> The only thing which doesn't change is my surprise over the minibar. You want <i>how</i> much for a can of cola? </p> pjf 2010-01-28T08:11:48+00:00 journal Roles without Moose? http://use.perl.org/~Ovid/journal/40127?from=rss <p> <a href="http://blogs.perl.org/users/ovid/2010/01/roles-without-moose.html">Milliseconds are important</a>.</p> Ovid 2010-01-25T14:04:31+00:00 journal The return of perl5i! http://use.perl.org/~schwern/journal/40125?from=rss <p>After an extended period in hibernation, <a href="http://search.cpan.org/dist/perl5i/">perl5i returns to CPAN</a> with a rack of <a href="http://github.com/schwern/perl5i/blob/21d2f7b777ee92870b16a5c1c7a212051053692d/Changes">new changes</a> since the last CPAN release. Thanks to Bruno Vecchi, Chas Owens, Darian Patrick, Jeff Lavallee, Michael Greb, rjbs, benh and chromatic for contributing!</p><p>Why was it deleted from CPAN? Version numbers. I'd used my usual ISO date integer style versioning but realized pretty quick that I need <a href="http://semver.org/">full X.Y.Z versioning</a> to indicate incompatible changes. Yes, perl5i is planning to be incompatible but without breaking your code!</p><p>How? By allowing you to declare what major version of perl5i you rely on. At this point its most likely going to be "use perl5i::2" which has the nice benefit of also allowing you to declare a dependency on perl5i::2. Easy peasy.</p><p>The question remains, what should "use perl5i" do? Should it A) load the currently installed version of perl5i? Or B) die with instructions on what to do? A is convenient, but means you'll get (probably unknowingly) walloped by an incompatibility later. B is a little inconvenient, but it makes the planned incompatibilities explicit and visible. The existence of a perl5i command line program (which also works on the #! line) makes A less of a concern if you want to go that route. So likely in short order "use perl5i" won't work any more. But I'd still like your thoughts on the matter.</p> schwern 2010-01-24T02:00:43+00:00 journal Unless what? http://use.perl.org/~Ovid/journal/40103?from=rss <p> <a href="http://blogs.perl.org/users/ovid/2010/01/unless-what.html">Unless what?</a> </p> Ovid 2010-01-15T11:47:53+00:00 journal Dear Recruiters http://use.perl.org/~Ovid/journal/40100?from=rss <p> <a href="http://blogs.perl.org/users/ovid/2010/01/dear-recruiters.html">Dear Recruiters</a> </p> Ovid 2010-01-13T13:06:11+00:00 journal Next QA Hackathon -- What Do You Need? http://use.perl.org/~Ovid/journal/40093?from=rss <p> <a href="http://blogs.perl.org/users/ovid/2010/01/next-qa-hackathon----what-do-you-need.html">Read about the next QA Hackathon</a>.</p> Ovid 2010-01-12T11:37:14+00:00 journal Great Perl Code http://use.perl.org/~schwern/journal/40090?from=rss <p>I was in a bar the other day talking with somebody about Perl. He asked, "what is some great Perl code I could read?" He was looking for a non-trivial amount of production Perl 5 code that elegantly solves a problem, and is beautiful to read.</p><p>I'm couldn't answer that. The code I see is either beautiful to read but fairly boring in what it does OR is an elegant solution but is terrifying to read (for example, autodie). I'm a biased observer, I work mostly with the plumbing so I see mostly the scary stuff that implements the elegant solutions.</p><p>What code would you show a non-Perl programmer read that is both beautiful and interesting?</p> schwern 2010-01-11T22:59:39+00:00 journal