CC: | Christian Recktenwald <cpan-contact [...] fischglas.de> |
Subject: | Can't locate object method "readZoneFile" via package "main" |
Date: | Sun, 30 Sep 2007 14:03:02 +0200 |
To: | bug-DNS-ZoneParse [...] rt.cpan.org |
From: | Christian Recktenwald <cpan-contact [...] fischglas.de> |
Problem:
sample code produces error message:
Can't locate object method "readZoneFile" via package "main" at /usr/share/perl5/DNS/ZoneFile.pm line 139.
Sample Code:
#!/usr/bin/perl
#
use strict;
use DNS::ZoneFile;
my $zoneFileName = "/etc/named/0.0.10.in-addr.arpa."
my $zone=DNS::ZoneFile->new(
$zoneFileName,
ZONE_ORIGIN => ".",
);
Module version:
# $Id: ZoneFile.pm,v 1.5 2000/09/24 23:56:33 mbm Exp $
Perl Version:
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
OS version:
Debian GNU/Linux 4.0 (Etch)
Linux 2.6.18-5-686 i686
Suggested Fix:
in DNS::ZoneFile.pm, line 115, replace
my $pack=ref $proto or $proto;
with
my $pack=ref($proto) || $proto;
Documentation:
man perltoot
sect "Planning for the Future: Better Constructors"
--
Christian Recktenwald | elwood sys adm
cpan-contact@fischglas.de |