Resources for MacPerl etc.
Hi, Reading the list I discovered MacPerl, Mac::Glue etc. I program in Perl on UNIX/Linux/Mac OSX but have never done any GUI stuff and thought it may be fun to try this out. I've spent quite a bit of time searching the web but have not come up with any Tutorials or high level information, I've read through the perldoc on the modules but this is low level stuff I want to get my hands dirty by trying stuff out .. Are there any up to date documents for Mac OS X that I may read to get my teeth into this ? I've noticed Chris Nandor's book but it predates Mac OS X. Thanks in advance for any leads to information to get my teeth into. Jerry
Re: Resources for MacPerl etc.
Hi Jerry, I program in Perl on UNIX/Linux/Mac OSX but have never done any GUI stuff and thought it may be fun to try this out. On Mac OS X, you should take a look at Camelbones. It allows you to use the Mac's native GUI toolkit (Cocoa) from Perl. http://camelbones.sourceforge.net/ Thilo
Re: Resources for MacPerl etc.
On Sunday, Nov 9, 2003, at 13:44 Europe/Brussels, Thilo Planz wrote: Hi Jerry, I program in Perl on UNIX/Linux/Mac OSX but have never done any GUI stuff and thought it may be fun to try this out. On Mac OS X, you should take a look at Camelbones. It allows you to use the Mac's native GUI toolkit (Cocoa) from Perl. http://camelbones.sourceforge.net/ Thanks Thilo but real programmers don't click, users click ;-)) Not to mention that I'm allergic to Visual This and Visual That .. Seriously, I'm reading up on Mac::Glue etc and this is really what I want, if only I found up to date Tutorial or book or primer.. I want to start up iTunes and extract my song list, load into MySQL using DBD::mysql and then interrogate the Tables.. All from Perl. Or write a Cocoa GUI to load user entered data into MySQL .. instead of using a Web browser and CGI.. Perhaps I should go back to my CLI and CGI ;-)) Jerry
Re: Resources for MacPerl etc.
At 2:09 pm +0100 9/11/03, Jerry Rocteur wrote: I want to start up iTunes and extract my song list, load into MySQL using DBD::mysql and then interrogate the Tables.. All from Perl. Or write a Cocoa GUI to load user entered data into MySQL .. instead of using a Web browser and CGI.. Try this: http://cocoamysql.sourceforge.net/
Re: Resources for MacPerl etc.
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jerry Rocteur) wrote: Seriously, I'm reading up on Mac::Glue etc and this is really what I want, if only I found up to date Tutorial or book or primer.. I want to start up iTunes and extract my song list, load into MySQL using DBD::mysql and then interrogate the Tables.. All from Perl. Well, there are examples in ex/ in the Mac::Glue distribution, which give a lot of information. Also, a fairly extensive, though dense (and assumes some understanding of Apple events or AppleScript), explanation of Mac::Glue is given in the supplied docs. Anything more, feel free to ask specific questions here. For example, to extract song data, you can do: use Mac::Glue ':glue'; my $itunes = new Mac::Glue 'iTunes'; my $library = $itunes-obj(library_playlist = 1); my $songs = $library-obj(tracks = glueAll); my @tracks = map { song_data($_) } $songs-get; sub song_data { my($track) = @_; my @fields = qw(name artist album); my %info = map { ($_ = $track-prop($_)-get) } @fields; return \%info; } Now @tracks contains a (possibly very large, if your library is as big as mine :-) list of all your tracks. You may wish to instead loop over $songs-get and put one track into MySQL at a time, and this would integrate quite easily with DBI + DBD::mysql. -- Chris Nandor [EMAIL PROTECTED]http://pudge.net/ Open Source Development Network[EMAIL PROTECTED] http://osdn.com/