Created
May 27, 2013 10:58
-
-
Save moriyoshi/5656481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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