<?xml version="1.0" encoding="windows-1252"?>
<node id="1005253" title="Self-updating github gists" created="2012-11-23 06:07:34" updated="2012-11-23 06:07:34">
<type id="1042">
CUFP</type>
<author id="757127">
tobyink</author>
<data>
<field name="doctext">
&lt;p&gt;If you're working on a POD document and you want to upload it as a GitHub gist, just add the following to the top:&lt;/p&gt;

&lt;code&gt;
#!/usr/bin/env perl
use App::gist;
@ARGV = $0;
App::gist-&gt;run;
&lt;/code&gt;

&lt;p&gt;... and mark the POD file as executable. Then run it. (Many programmers' text editors have a built-in command or hotkey to execute the current file.) Yay, it's uploaded to GitHub as a gist. This should give you a numeric gist identifier. Change the third line to:&lt;/p&gt;

&lt;code&gt;
@ARGV = ('-u', 412345, $0);  # or whatever identifier
&lt;/code&gt;

&lt;p&gt;Now executing the file will update the existing gist in place.&lt;/p&gt;

&lt;p&gt;Yet another reason to use POD over another markup language. :-)&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-757127"&gt;
&lt;small&gt;&lt;small&gt;
&lt;tt&gt;perl -E'sub Monkey::do{say$_,for@_,do{($monkey=&amp;#x5B;caller(0)]-&gt;&amp;#x5B;3])=~s{::}{ }and$monkey}}"Monkey say"-&gt;Monkey::do'
&lt;/tt&gt;&lt;/small&gt;&lt;/small&gt;
&lt;/div&gt;&lt;/div&gt;</field>
</data>
</node>
