develooper Front page | perl.beginners | Postings from May 2007

Re: overriding posix::uname

Thread Previous | Thread Next
From:
Jeff Pang
Date:
May 18, 2007 21:12
Subject:
Re: overriding posix::uname
Message ID:
464E7932.2060508@earthlink.net
Ken Foskey 写道:
> sub is_dev
> {
>     my ($server, $host) = POSIX::uname();
> 
> 	if ($host eq "aixmbk10") {
> 		return 1;
> 
> I want to test this module in a test script.  SO I want to code the
> various servers and check that it works.
> 
> Is there a way to override the call to POSIX::uname
> 

Why not $^O?

$ perl -e 'print $^O'
linux


-- 
http://home.arcor.de/jeffpang/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About