Apache-iTunes
view release on metacpan or search on metacpan
html/iTunes.html view on Meta::CPAN
require URI::Escape;
my $str;
foreach my $this ( @playlists )
{
if( $this eq $playlist )
{
$str .= qq|<tr><td bgcolor="#00ccff"><b>$this</b></td></tr>\n|;
}
else
{
my $encoded = URI::Escape::uri_escape( $this );
$str .= "<tr><td>";
$str .= qq|<a href="$base/playlist/$encoded">$this</a>|;
$str .= "</td></tr>\n";
}
}
$str;
}
</table>
</td>
<td valign="top">
<table>
{
no warnings 'uninitialized';
my $str;
my $count = 0;
my $list = URI::Escape::uri_escape( $playlist );
foreach my $track ( @tracks )
{
$count++;
if( $track eq $current )
{
$str .= qq|<tr><td bgcolor="#00ccff"><b>$track</b></td></tr>\n|;
}
else
{
lib/Apache/iTunes.pm view on Meta::CPAN
package Apache::iTunes;
use strict;
use vars qw($VERSION);
use Apache::Constants qw(:common);
use Apache::Util qw(unescape_uri);;
use Mac::iTunes;
use Text::Template;
$VERSION = 0.12;
=head1 NAME
Apache::iTunes - control iTunes from mod_perl
=head1 SYNOPSIS
lib/Apache/iTunes.pm view on Meta::CPAN
%Set = map { $_, 1 }
qw( playlist );
$Volume = $Controller->volume;
sub handler
{
my $r = shift;
my( undef, $command, @path_info )= split m|/|, ( $r->path_info || '' );
$command = '' unless $command; # silence warning
@path_info = map { unescape_uri( $_ ) } @path_info;
my %params = $r->args;
if( exists $Commands{ $command } )
{
$Controller->$command;
}
elsif( $command eq 'playlist' and defined $path_info[0]
and $Controller->playlist_exists( $path_info[0] ) )
{
( run in 0.523 second using v1.01-cache-2.11-cpan-c21f80fb71c )