Skip to content

Instantly share code, notes, and snippets.

@selenamarie
Created January 12, 2010 01:33
Show Gist options
  • Save selenamarie/274793 to your computer and use it in GitHub Desktop.
Save selenamarie/274793 to your computer and use it in GitHub Desktop.
# totally useful - echo the command and '| sudo sh'
http://www.linuxjournal.com/content/running-complex-commands-sudo
# from irc:
To inline a package, but include it at the end of the file:
Package->import;
<some stuff>
BEGIN {
package Package;
<some stuff>
}
Caveats: so don't use exports, don't use strict subs, eval <DATA>, or put your package at the beginning
Eval of data method:
BEGIN {eval(do {local $/; <DATA>})}
Also check out PAR for packaging stuff up.
ewilhelm made Package::Tent for prototyping things, but not so useful for shipability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment