Do you know where your variables are? | |
PerlMonks |
Re: How to create GUI for a perl script on MAC?/Apple Script and Perl?by tobyink (Canon) |
on Jan 18, 2013 at 07:25 UTC ( [id://1013968]=note: print w/replies, xml ) | Need Help?? |
If you can persuade the Wx module to install on your system (WxWidgets does work on Mac, so it should theoretically, and according to the CPAN testers service there are successful install reports from Mac OS X), then you could investigate my Ask module. It's as simple as:
Then Ask does the rest. If the user has run your script through the Mac terminal, Ask should detect this, and to input and output via the terminal. If they've launched your script by, say, double clicking it in Finder, it will notice there's no terminal and interact with the user via dialog boxes. I do keep meaning to write a blogs.perl.org post about Ask. Update: blog post written... Ask not what your user can do for you...
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|