Audio-Beep
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use File::Copy;
use File::Spec::Functions;
use File::Path;
my %prereq = (
'Test::More' => 0,
);
my @libs = ();
if ($^O eq 'MSWin32') {
prompt(<<EOM) unless Win32::IsWinNT;
Currently the only Windows systems supported are NT, 2000 and XP.
I will install anyway, but beware the module won't work as supposed to.
PRESS [ENTER]
EOM
$prepreq{'Win32::API'} = 0;
@libs = (catdir(qw(lib Audio Beep Win32)));
} elsif ($^O eq 'freebsd') {
prompt( <<EOM );
The port to FreeBSD is largely sperimental: please read documentation for
Audio::Beep::BSD::beep and report success or failure. Thank you.
PRESS [ENTER]
EOM
#I include only FreeBSD cause i found a port of "beep" for that BSD
#if you know of other BSDs where "beep" works, let me know
@libs = (catdir(qw(lib Audio Beep BSD)));
} elsif ($^O eq 'linux') {
@libs = (catdir(qw(lib Audio Beep Linux)));
} else {
prompt( <<EOM );
Your operating system is not supported:
i will install only the Audio::Beep module (no submodules)
NB: 'make test' will fail
PRESS [ENTER]
EOM
}
my $message = <<EOM;
Would you like to install Japanese documentation?
If you enter 'y' then i will try to install Japanese docs alongside
English ones. On platforms using 'man' manpages (typically on UN*X)
Japanese documentation will be available transparently to users whose
locale language is set to Japanese.
On other platforms the documentation will be available as Audio::Beep_jp
Default is to not install Japanese docs. [N/y]
EOM
chop($message);
my $jp_docs = prompt($message);
$jp_docs = ($jp_docs =~ /^y(es)?$/i ? 1 : 0);
if ($jp_docs) {
copy(catfile(qw(pods jp Beep.pod)), 'Beep_jp.pod');
}
WriteMakefile(
NAME => 'Audio::Beep',
VERSION_FROM => 'Beep.pm',
( run in 1.304 second using v1.01-cache-2.11-cpan-6aa56a78535 )