| 1 | package Growl::Any::Win32MSAgent; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use parent qw(Growl::Any::Base); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use Carp (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use Win32::MSAgent (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 0 | ▶ | sub register { | ||||||||||||||||||||||||||
|
Subroutine
register: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 11 | 0 | my ($self, $appname, $events) = @_; | |||||||||||||||||||||||||||
| 12 | 0 | $self->SUPER::register($appname, $events); | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | my $character = 'Merlin'; | |||||||||||||||||||||||||||
| 15 | 0 | my $agent = Win32::MSAgent->new($character); | |||||||||||||||||||||||||||
| 16 | 0 | $agent->Language2LanguageID("English (United States)"); | |||||||||||||||||||||||||||
| 17 | 0 | $self->{instance} = $agent->Characters($character); | |||||||||||||||||||||||||||
| 18 | 0 | $self->{instance}->SoundEffectsOn(1); | |||||||||||||||||||||||||||
| 19 | 0 | $self->{instance}->Show(); | |||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | sub notify { | ||||||||||||||||||||||||||
|
Subroutine
notify: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 23 | 0 | my ($self, $event, $title, $message, $icon) = @_; | |||||||||||||||||||||||||||
| 24 | 0 | my $req = $self->{instance}->Speak("[$event]$title"."\n".$message); | |||||||||||||||||||||||||||
| 25 | 0 | my $i = 0; | |||||||||||||||||||||||||||
| 26 | 0 | ▶ | while (($req->Status == 2) || ($req->Status == 4)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$req->Status == 2 or $req->Status == 4
MC/DC0%0/2
$req->Status == 2 or $req->Status == 4
$req->Status == 2
$req->Status == 4
Truth table0%0/3
A or B
A= $req->Status == 2B= $req->Status == 4
| |||||||||||||||||||||||||||||
| 27 | 0 | ▶ | $self->{instance}->Stop($req) if $i >10; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 28 | 0 | sleep(1); | |||||||||||||||||||||||||||
| 29 | 0 | $i++; | |||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 1; | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | __END__ | ||||||||||||||||||||||||||||