Mac::Choose - make a choice with the choose command line util
use Mac::Choose qw(choose); my $color = choose qw( red orange yellow green blue indigo violet ) or die "User canceled selection";
choose is a commerical commandline utility for OS X from Tiny Robot Software that shows a simple fuzzy-matching GUI for selecting from one of several options.
choose
http://tinyrobotsoftware.com/choose/
This module is a really really thin wrapper around it that handles the shelling out to the process via IPC::Open2.
This module exports one function on request, or you can call it fully qualified.
Shows the GUI allowing the user to pick from the possibilities. Returns the selected option, or undef if the user canceled the selection (by hitting ESC / clicking outside the dialog.)
This module assumes that the choose command line executable has been downloaded and installed in your path. If you've installed choose somewhere outside of your path, you can use the $Mac::Choose::executable_path to override the path to the executable.
local $Mac::Choose::executable_path = "/stuff/bin/choose"; my $char = choose "Buffy","Willow","Xander","Tara","Oz";
Bugs (and requests for new features) can be reported though the CPAN RT system: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mac-Choose
Alternatively, you can simply fork this project on github and send me pull requests. Please see http://github.com/2shortplanks/Mac-Choose
Written by Mark Fowler <mark@twoshortplanks.com>
Copyright Mark Fowler 2014. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The choose command line utility itself is copyright Tiny Robot Software. Neither Mark Fowler nor this Perl library is associated with the choose command line utility or Tiny Robot Software.
To install Mac::Choose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::Choose
CPAN shell
perl -MCPAN -e shell install Mac::Choose
For more information on module installation, please visit the detailed CPAN module installation guide.