| | 53 | This class ejects the CD each time a notification is triggered. |
|---|
| | 54 | |
|---|
| | 55 | This class relies on helper classes for the functionality for the |
|---|
| | 56 | particular operating system you are working on. Provided in the |
|---|
| | 57 | main Plagger distribution are helper classes for Linux, FreeBSD, |
|---|
| | 58 | Microsoft Windows (MSWin32) and Mac OS X (Darwin.) |
|---|
| | 59 | |
|---|
| | 60 | =head2 Writing helper classes |
|---|
| | 61 | |
|---|
| | 62 | This module relies on a helper class existing that is named after |
|---|
| | 63 | the architecture name returned in C<$^O>. |
|---|
| | 64 | |
|---|
| | 65 | Each module must simply subclass this module and implement the |
|---|
| | 66 | C<eject> method. For example, for the hypothetical HAL2000 system: |
|---|
| | 67 | |
|---|
| | 68 | package Plagger::Plugin::Notify::Eject::hal2000; |
|---|
| | 69 | use base qw( Plagger::Plugin::Notify::Eject ); |
|---|
| | 70 | |
|---|
| | 71 | sub eject { |
|---|
| | 72 | system("eject_the_cd_bay_doors_hal"); |
|---|
| | 73 | } |
|---|
| | 74 | |
|---|
| | 75 | 1; |
|---|