[sf-perl] Net::Domain and system()

Bill Moseley moseley at hank.org
Mon Jan 29 20:24:09 PST 2007


On Mon, Jan 29, 2007 at 07:41:42PM -0800, David Alban wrote:
>     Ambiguous call resolved as CORE::system(), qualify as such or use
> & at ... line ....

How about system()?

> I distilled it down to a simple example running on a machine with uname output:

I can't repeat, but...

>   This is perl, v5.8.0 built for i386-linux-thread-multi

Isn't 5.8.0 from about 2002?  Maybe that's the problem?

> Here is Foo/Bar.pm:
> 
>      1  package Foo::Bar;
>      2
>      3  use strict;
>      4  use warnings;
>      5
>      6  use Net::Domain;
>      7
>      8  get_hostname();

Why are you calling get_hostname() there?

Is this your example that fails?

moseley at bumby:~$ cat t.pl
#!/usr/bin/perl
use strict;
use warnings;
use lib '.';
use Bar;

system "echo foo";


moseley at bumby:~$ cat Bar.pm 
package Bar;
use strict;
use warnings;
use Net::Domain;
get_hostname();

sub get_hostname {
    return Net::Domain::hostfqdn();
}
1;


moseley at bumby:~$ perl t.pl
foo


-- 
Bill Moseley
moseley at hank.org



More information about the SanFrancisco-pm mailing list