Mac::Glue Syntax Revisited
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')->getThat 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.
Leave a comment