Plagger/Plugin/Notify/Audio/iTunesWin32.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
play
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Plagger::Plugin::Notify::Audio::iTunesWin32;
2 use strict;
3 use base qw( Plagger::Plugin::Notify::Audio );
4
5 use Win32::OLE;
6
7 sub play {
8 my($self, $filename, $length) = @_;
9 $filename or return $self->log(error => "filename is not set");
10
11 my $itunes = Win32::OLE->new("iTunes.Application");
12 $itunes->PlayFile($filename);
13 sleep $length;
14 }
15
16 1;