App::Pimpd::Playlist::Randomize - Package exporting various randomizing functions
my @random_songs = randomize(10);
my @random_albums = randomize_albums(5);
my $random_song = random_track_in_playlist();
App::Pimpd::Playlist::Randomize provides functions for altering the current playlist in random ways.
my @randoms = randomize(42);
my $randoms = randomize();
Parameters: $integer, $artist
Returns: @songs | \@songs
In list context, returns a list with n random paths ( all relative to MPD ). If a second argument is provided it's interpreted as an artist name. The list will be crafted together with random paths from that artist.
In scalar context, returns an array reference.
If called with zero arguments, a default value of 100 totally random songs is used.
my @random_albums = random_albums(42);
my $random_albums_songs = random_albums();
Parameters: $integer | NONE
Returns: @songs | scalar(@songs)
In list context, returns a list with the paths to the songs of n random albums.
In scalar context, returns the number of songs found on the n random albums.
If called with zero arguments, a default value of 10 albums is used.
my $position = random_track_in_playlist();
Returns a valid playlist position id, used to reference a song in the playlist.
CPAN ID: WOLDRICH
Copyright (C) 2010, 2011 Magnus Woldrich. All right reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::Pimpd, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.