brian d foy > Mac-iTunes-1.22 > Mac::iTunes::Playlist

Download:
Mac-iTunes-1.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.22   Source  

NAME ^

Mac::iTunes::Playlist

SYNOPSIS ^

        use Mac::iTunes::Playlist;

        my $playlist = Mac::iTunes::Playlist->new( @items );

DESCRIPTION ^

METHODS

new( TITLE, ARRAYREF )
new_from_directory( TITLE, DIRECTORY )

Create a playlist from all of the MP3 files in the named directory.

title

Returns the title of the playlist.

items

In list context, returns a list of the items in the playlist.

In scalar context, returns the number of items in the playlist.

next_item

Not implemented

previous_item

Not implemented

add_item( OBJECT )

Adds the Mac::iTunes::Item object to the playlist.

Returns undef or the empty list if the argument is not a Mac::iTunes::Item object.

delete_item( INDEX )

Deletes the item at index INDEX (counting from zero).

Returns false is the INDEX is greater than the index of the last item. Returns true otherwise.

merge( PLAYLIST )

Adds the items in PLAYLIST to the current playlist and returns the number of items added.

Returns undefined (or the empty list) if the argument is not the right sort of object. Returns 0 if no items were added (which might not be an error).

This method does a deep copy of the Items object. Identical items show up as different objects in each playlist so that the playlists do not refer to each other.

random_item

In scalar context, returns a random item from the playlist.

In list context, returns the item, the index of the item, and the total count of items.

Returns false or the empty list if the playlist has no items.

copy

Return a deep copy of the playlist. The returned object will not refer (as in, point to the same data) as the original object.

Publisher

publish( FORMAT [, FIELDS_REF [, ORDER_REF ] ] )

Output the playlist in some format.

Not implemented.

SOURCE AVAILABILITY ^

This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.

        http://sourceforge.net/projects/brian-d-foy/

If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.

SEE ALSO ^

Mac::iTunes, Mac::iTunes::Item

TO DO ^

* everything - the list of things already done is much shorter.

AUTHOR ^

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (c) 2002-2007 brian d foy. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: