Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Self-updating github gists

by tobyink (Abbot)
on Nov 23, 2012 at 11:07 UTC ( #1005253=CUFP: print w/ replies, xml ) Need Help??

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:

#!/usr/bin/env perl use App::gist; @ARGV = $0; App::gist->run;

... 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:

@ARGV = ('-u', 412345, $0); # or whatever identifier

Now executing the file will update the existing gist in place.

Yet another reason to use POD over another markup language. :-)

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Comment on Self-updating github gists
Select or Download Code
Replies are listed 'Best First'.
Re: Self-updating github gists
by aufflick (Deacon) on Nov 29, 2012 at 01:39 UTC
    Wow, that's neat!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://1005253]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-28 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls