Created
February 6, 2012 23:25
-
-
Save alexm/1755855 to your computer and use it in GitHub Desktop.
This file contains 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
sub opt_postinstalls { | |
print "\nValid Postinstalls\n"; | |
print "------------------\n\n"; | |
list_postinstall(); | |
print "\n"; | |
exit 0 | |
} | |
sub opt_distros { | |
print "\nValid Distributions\n"; | |
print "-------------------\n\n"; | |
list_distros(); | |
print "\n"; | |
exit 0 | |
} | |
sub opt_vlans { | |
print "\Valid Vlans\n"; | |
print "---------------\n\n"; | |
print Dumper $vlans; | |
exit 0 | |
} | |
my $opt_discs = sub { | |
print "\nValid Discs\n"; | |
print "---------------\n\n"; | |
print Dumper $discs; | |
exit 0 | |
}; | |
my $opt_partitions = sub { | |
print "\nValid Partitions\n"; | |
print "---------------\n\n"; | |
print Dumper $partitions; | |
exit 0 | |
}; | |
GetOptions ( | |
# referències a funcions | |
'postintalls|P' => \&opt_postinstalls, | |
'distros|D' => \&opt_distros, | |
'vlans|V' => \&opt_vlans, | |
# clausures | |
'discs|d' => $opt_discs, | |
'partitions|p' => $opt_partitions, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment