On Thu, Apr 18, 2013 at 09:14:46AM -0300, Alceu Rodrigues de Freitas Junior wrote:
> For that, I release a distribution that would to just like > Devel::CheckOS ... > > This is the list of operational systems that would be supported (sub > from Siebel::AssertOS): > > sub os_is { > > my $os = shift; > > given ($os) { > > when ('linux') { return 1 } > when ('MSWin32') { return 1 } > when ('aix') { return 1 } > when ('solaris') { return 1 } > when ('hpux') { return 1 } > default { return 0 } > } > } I would have written Siebel::AssertOS thus: package Devel::AssertOS::OSFeatures::SupportsSiebel; use Devel::CheckOS; sub matches { return qw(Linux AIX Solaris HPUX MSWin32); } sub os_is { Devel::CheckOS::os_is(matches()); } Devel::CheckOS::die_unsupported() unless(os_is()); sub expn { "The operating system can run Siebel CRM" } -- David Cantrell | even more awesome than a panda-fur coat Computer Science is about lofty design goals and careful algorithmic optimisation. Sysadminning is about cleaning up the resulting mess.