<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Olivier Mengué (dolmen)</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/dolmen/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/dolmen/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/dolmen//574</id>
    <updated>2013-04-13T09:26:10Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Hacking in progress in Lancaster</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/dolmen/2013/04/hacking-in-progress-in-lancaster.html" />
    <id>tag:blogs.perl.org,2013:/users/olivier_mengue_dolmen//574.4559</id>

    <published>2013-04-13T09:16:21Z</published>
    <updated>2013-04-13T09:26:10Z</updated>

    <summary>The Perl QA Hackathon 2013 started yesterday in Lancaster. About 30 people hacking to fix bugs in the Perl toolchain and all our tools we use daily to publish stuff on the CPAN. Thanks to all our sponsors that make...</summary>
    <author>
        <name>Olivier Mengué (dolmen)</name>
        <uri>https://metacpan.org/author/dolmen</uri>
    </author>
    
    <category term="qa2013lancasterconsensus" label="qa2013 LancasterConsensus" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/dolmen/">
        <![CDATA[<p>The <a href="2013.qa-hackathon.org/qa2013/">Perl QA Hackathon 2013</a> started yesterday in Lancaster. About 30 people hacking to fix bugs in the Perl toolchain and all our tools we use daily to publish stuff on the CPAN. Thanks to all our sponsors that make this event possible and to all the benevolent hackers that came from all over the world.</p>

<p>Follow our news on the Twitter feed: <a href="http://twitter.com/perlqah">@perlqah</a>.</p>]]>
        <![CDATA[<p>Hash tags: #qa2013 #LancasterConsensus</p>

<p>If you're not physically here in Lancaster, you can still collaborate with us remotely. Just join us on #perl-qa at irc.perl.org.<br />
</p>]]>
    </content>
</entry>

<entry>
    <title>Profiling Dist::Zilla</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/dolmen/2013/01/profiling-distzilla.html" />
    <id>tag:blogs.perl.org,2013:/users/olivier_mengue_dolmen//574.4232</id>

    <published>2013-01-25T18:36:08Z</published>
    <updated>2013-01-25T18:33:50Z</updated>

    <summary>Dist::Zilla is slooooowww! This is in part because it uses Moose. In part because it has many features. In part because it uses App::Cmd that has a major design issue (it loads all command plugins on every run). But this...</summary>
    <author>
        <name>Olivier Mengué (dolmen)</name>
        <uri>https://metacpan.org/author/dolmen</uri>
    </author>
    
    <category term="develtraceuse" label="Devel::TraceUse" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="distzilla" label="Dist::Zilla" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dzil" label="dzil" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="plugins" label="plugins" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="profiling" label="profiling" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/dolmen/">
        <![CDATA[<p><a href="https://metacpan.org/module/Dist::Zilla">Dist::Zilla</a> is <strong>slooooowww</strong>!</p>

<p>This is in part because it uses Moose. In part because it has many features. In part because it uses <a href="https://metacpan.org/module/App::Cmd">App::Cmd</a> that has a major <a href="https://rt.cpan.org/Ticket/Display.html?id=54947">design issue</a> (it loads <em>all</em> command plugins on every run).</p>

<p>But this is also because most plugins are written without care for their compile time and run time cost especially when they are loaded but not used. For example the <a href="https://metacpan.org/module/Dist::Zilla::Role::BeforeRelease">BeforeRelease</a> plugins when you just run <code>dzil test</code>.</p>

<p>Despites this I'm using it every day at work (because it is powerful), but with much pain.</p>

<p>So here are some tips on how to contribute to improve that situation.</p>]]>
        <![CDATA[<p>The first rule for plugins authors is to load runtime dependencies only at runtime. Not at compile time. For example, if a plugin needs App::Prove, it must <em>not</em> load it with:</p>

<pre><code>use App::Prove 3.00;
</code></pre>

<p>Instead you have to load it at runtime when it is really used:</p>

<pre><code>require App::Prove;
App::Prove->VERSION('3.00');

<p>App::Prove->new(...);<br />
</code></pre></p>

<p>I have already fixed most of the plugins bundled in the Dist::Zilla core <a href="https://github.com/rjbs/dist-zilla/pull/142">by</a> <a href="https://github.com/rjbs/dist-zilla/pull/141">submitting</a> <a href="https://github.com/rjbs/dist-zilla/pull/140">patches</a>, and I have submitted RT tickets and patches to a <a href="https://github.com/dagolden/dist-zilla-plugin-checkextratests/pull/4">bunch</a> <a href="https://github.com/kentfredric/Dist-Zilla-App-Command-dumpphases/pull/2">of</a> <a href="https://github.com/rjbs/dist-zilla-plugin-checkprereqsindexed/pull/4">other</a> <a href="https://rt.cpan.org/Ticket/Display.html?id=82956">plugins</a> from the CPAN.</p>

<p>You can find by yourself the bad plugins by profiling Dist::Zilla with <a href="https://metacpan.org/module/Devel::TraceUse">Devel::TraceUse</a>:<br />
<pre>perl -d:TraceUse -S dzil nop 2>traceuse.txt</pre></p>

<p>You'll get a 600 lines file that lists all the perl files loaded as a tree that tells you who required it first. So you can easily find the Dist::Zilla::Plugin::* or Dist::Zilla::App::Command::* module that loads too much things.</p>

<p>For more advanced dzil profiling tips, check this <a href="https://gist.github.com/4596262">gist</a>.</p>

<p>So <strong>this is a call for help to fix all the dzil plugins</strong>! Submit tickets and send pull requests to plugins maintainers!</p>

<hr/>

<p>PS: when I started to use Dist::Zilla I immediately tried to workaround the issue with my own tool <a href="https://metacpan.org/module/Dist::Zilla::Shell">Dist::Zilla::Shell</a>, in hope to reduce that load time cost. Unfortunately it is quite experimental (I've seen some issues due to caching somewhere of <a href="https://metacpan.org/module/PPI">PPI</a> documents), but I would appreciate feedback and bug reports.</p>]]>
    </content>
</entry>

<entry>
    <title>Perl in msysgit : call for help</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/dolmen/2012/11/perl-in-msysgit-call-for-help.html" />
    <id>tag:blogs.perl.org,2012:/users/olivier_mengue_dolmen//574.4061</id>

    <published>2012-11-22T09:23:28Z</published>
    <updated>2012-11-22T09:50:44Z</updated>

    <summary>The port of Git on Win32, msysgit, has Perl bundled with it. This means that most Git users on Windows have a perl installed somewhere. This is an important opportunity to bring developer tools written in Perl to a larger...</summary>
    <author>
        <name>Olivier Mengué (dolmen)</name>
        <uri>https://metacpan.org/author/dolmen</uri>
    </author>
    
    <category term="588" label="5.8.8" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="githubkeygen" label="github-keygen" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="msys" label="msys" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="msysgit" label="msysgit" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="Perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/dolmen/">
        <![CDATA[<p>The port of Git on Win32, <a href="http://msysgit.github.com/">msysgit</a>, has Perl bundled with it. This means that most Git users on Windows have a perl installed somewhere. This is an important opportunity to bring developer tools written in Perl to a larger audience. My own <a href="https://github.com/dolmen/github-keygen">github-keygen</a> tool is one of them.</p>

<p>Unfortunately, that perl has some quirks:</p>
<ul>
	<li>this is an old 5.8.8, with a huge patch</li>
	<li>it is built on <code>msys</code>, which a quite uncommon environment for Win32 perl developers (from the Perl developer it more like Unix : forward slashes, PATH separator is ':'...)</li>
        <li>some core modules are missing. I noticed in particular the whole <code>Pod::</code> tree</li>
</ul>

<p><a href="https://github.com/msysgit/msysgit/issues/61">I tried to work on the Perl upgrade</a>, but this is a too tough task for me.</p>

<p>So please <a href="https://github.com/msysgit/msysgit/issues/61"></a>help to bring a modern Perl to the Windows world!</p>]]>
        
    </content>
</entry>

<entry>
    <title>HTTPS-Everywhere rulesets for Perl sites</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/dolmen/2012/09/https-everywhere-rulesets-for-perl-sites.html" />
    <id>tag:blogs.perl.org,2012:/users/olivier_mengue_dolmen//574.3845</id>

    <published>2012-09-18T19:36:25Z</published>
    <updated>2012-09-18T16:22:12Z</updated>

    <summary>HTTPS-Everywhere is a Firefox and Chrome extension brought by the EFF to automatically use https:// URLs instead of http:// if the site supports that. Think about what happens when you type http://github.com instead of https://github.com/ in your address bar. So...</summary>
    <author>
        <name>Olivier Mengué (dolmen)</name>
        <uri>https://metacpan.org/author/dolmen</uri>
    </author>
    
    <category term="bitcard" label="BitCard" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="browser" label="browser" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="chrome" label="Chrome" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cpan" label="CPAN" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="firefox" label="Firefox" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="httpseverywhere" label="HTTPS-Everywhere" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="metacpan" label="MetaCPAN" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pause" label="PAUSE" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="security" label="security" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/dolmen/">
        <![CDATA[<p><a href="https://www.eff.org/https-everywhere/">HTTPS-Everywhere</a> is a Firefox and Chrome extension brought by the <a href="https://www.eff.org/">EFF</a> to automatically use https:// URLs instead of http:// if the site supports that. Think about what happens when you type http://github.com instead of https://github.com/ in your address bar.</p>

<p>So I added rulesets for PAUSE, BitCard and MetaCPAN.</p>]]>
        <![CDATA[<p>HTTPS-Everywhere makes its decision based on rulesets bundled with the extension, so this has three advantages:</p>
<ul>
<li>this is not just for URLs you type in the address bar: any http:// URL in the ruleset is automatically translated, so if a third party site links using http://, it will be translated. So you're always secure.</li>
<li>as the redirect happens directly inside your browser, no network transaction occurs and the remote site will never be contacted over an unencrypted link. This also one less HTTP redirect, so faster access to the final destination.</li>
<li>the extension includes rules to secure cookies (which means forbid sending a cookie set over https:// in a http:// request on the same domain)</li>
<li>this allows to fix sites that have a <a href="https://www.eff.org/https-everywhere/deploying-https">broken SSL implementation</a></li>
</ul>

<p>So <a href="https://mail1.eff.org/pipermail/https-everywhere-rules/2012-September/001310.html">I submitted rulesets</a> for some major Perl community sites that require authentication:</p>
<ul>
	<li><a href="https://pause.perl.org/">PAUSE</a>: <a href="https://github.com/dolmen/Firefox-HTTPS-Everywhere/blob/rules/Perl-sites/src/chrome/content/rules/PAUSE.xml">ruleset</a></li>
       <li><a href="https://metacpan.org/">MetaCPAN</a>: <a href="https://github.com/dolmen/Firefox-HTTPS-Everywhere/blob/rules/Perl-sites/src/chrome/content/rules/MetaCPAN.xml">ruleset</a></li>
        <li><a href="https://www.bitcard.org/">BitCard</a> (used to authenticate on <a href="http://rt.cpan.org/">rt.cpan.org</a> and <a href="http://cpanratings.perl.org/">cpanratings.perl.org</a>): <a href="https://github.com/dolmen/Firefox-HTTPS-Everywhere/blob/rules/Perl-sites/src/chrome/content/rules/BitCard.xml">ruleset</a>. Note that <a href="http://git.develooper.com/?p=bitcard.git;a=blob;f=TODO;h=41aca0fc95be177864b689ac8365f7ca8ef78362;hb=HEAD#l7">BitCard cookies are <em>not</em> secured</a> without this extension.</li>
</ul>

<p>I'm interested in adding support for other Perl community sites I've missed, so please submit them here as comments, or better as <a href="https://github.com/dolmen/Firefox-HTTPS-Everywhere/issues">issues on Github</a>.</p>]]>
    </content>
</entry>

</feed>
