Alessandro Ranellucci


POE::Component::Growl - Growl notification dispatcher for POE


 use POE qw(Component::Growl);
 # instantiate your Growl notifier:
    Alias                                => 'MyGrowl',
    AppName                      => 'MyApplication',
    Notifications                => [ 'one', 'two', 'three' ]
 # then post notifications from other POE sessions:
 sub myevent {
        my $kernel = $_[KERNEL];
        my $notification = {
           name => 'one',
           title => 'Title of notification',
           descr => 'Text of notification'
        $kernel->post('MyGrowl', 'post', 'one', $notification);
 # you can also directly access the notifier object instead of posting
 # notificaton through POE queue:
 my $growl =  POE::Component::Growl->spawn(...);


POE::Component::Growl provides a facility for notifying events through Growl using the Mac::Growl module as back-end. Integration with POE's architecture allows easy, non-blocking notifications.

Multiple notifiers can be spawned within the same POE application with multiple default options.



A program must spawn at least one POE::Component::Growl instance before it can perform Growl notifications. Each instance registers itself with Growl itself by passing a few parameters to it, and a reference to the object is returned for optional manual handling (see notify method below).

The following parameters can be passed to the spawn constructor (AppName and Notifications are required).


This must contain the name of the application. It may be a free string as it isn't required to match any existing file name; its purpose is only to let Growl define user preferences for each application.


This must be an arrayref containing the list of possible notifications from our application. These names will be displayed in Growl preference pane to let users customize options for each notification.


(Optional) This parameter can contain an arrayref with the list of notifications to enable by default. If DefaultNotifications isn't provided, POE::Component::Growl will enable all available notifications, otherwise the user will have to manually enable those which aren't included here.


(Optional) This parameter will be used to set POE's internal session alias. This is useful to post events and is also very important if you instantiate multiple notifiers. If left empty, the alias will be set to "Growl".


(Optional) This parameter can contain the name of an application whose icon is to use by default.


This method lets you post notifications without injecting them to POE's queue. While that way is preferred, notify may be useful for some particular purposes.


See below for an explanation of the $notification hashref.



Posting this event to your POE::Component::Growl notifier lets you pass messages to Growl from inside your POE application:

        $kernel->post('MyGrowl', 'post', $notification);

MyGrowl is the alias name (see above about Alias parameter), and $notification is a hashref with message (see below);


Each notification must be passed to POE::Component::Growl as a hashref with the following values:


The name of the notification (should be one of the Notifications list previously passed to the spawn constructor, see above).

title =item description

Title and description to be displayed by Growl.


(Optional) Set this flag to 1 to cause the notification to remain until manually dismissed by the user. If undefined or set to false, the notification will time out according to Growl default settings.


(Optional) This value may range from -2 for low priority to 2 for high priority.


(Optional) This can be an UNIX path to a file containing the image for the notification.

For detailed information and examples about these items, see It is specific to AppleScript but the concepts apply to this module as well, except that file paths for images are Unix paths, not URLs.


POE::Component::Growl and Mac::Growl expect strings to be passed as UTF-8, if they have high-bit characters. See Mac::Growl docs for more information.

SEE ALSO #growl on Mac::Growl POE


Latest versions can be downloaded from CPAN. You are very welcome to write mail to the author ( with your comments, suggestions, bug reports or complaints.


Alessandro Ranellucci <>


Copyright (c) 2005 Alessandro Ranellucci. All Rights Reserved. POE::Component::Growl is free software, you may redistribute it and/or modify it under the same terms as Perl itself.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 186:

You forgot a '=back' before '=head1'

Around line 200:

You forgot a '=back' before '=head1'