Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Sunday May 18, 2003
06:37 PM

Mac::Glue Syntax Revisited

[ #12294 ]

It hit me in the car today ... I had simplified this:

$itunes->get( $itunes->prop(location => $track) )

to this:

$itunes->get( $track->prop('location') )

But $track->prop('location') also returns an object just like $track (an Apple event object descriptor object, in the class Mac::AEObjDesc), so I can simplify it further to:

$track->prop('location')->get

That is so cool. I've always hated wrapping obj and prop calls in $glue->get(). I just have to think of a reason why this would be a bad idea, but it looks good to me, and works dandily.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.