Skip to content

Instantly share code, notes, and snippets.

@moriyoshi
Created May 27, 2013 10:58
Show Gist options
  • Save moriyoshi/5656481 to your computer and use it in GitHub Desktop.
Save moriyoshi/5656481 to your computer and use it in GitHub Desktop.
package commands;
use strict;
use warnings;
use constant now => 'now';
use overload 'neg' => sub { return $_[0] };
BEGIN {
*CORE::GLOBAL::shutdown = sub(@) {
return ('shutdown', @{$_[0]});
}
}
sub sudo(@) {
exec 'sudo', @_;
}
sub h($) {
bless ['-h', @_];
}
sudo shutdown -h now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment