Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Could someone help me figure out how to use DNS::ZoneFile? I've tried a few of the different modules for DNS manipulation, but I'm not having much luck. I followed this example and wrote this and tried to just get it to print one zone...

#!/usr/bin/perl -w use strict; use DNS::ZoneFile; my ($ORIGIN,$NEW_ZONE); my $zone=DNS::ZoneFile->new( "../named.master.conf/_dnsmaster", ZONE_ORIGIN=>$ORIGIN, NEW_ZONE=>$NEW_ZONE, ); $zone->printZone( "" );
Running this yields:

> perl Useless use of private variable in void context at /usr/local/lib/perl +5/site_perl/5.6.1/DNS/ line 115. Use of implicit split to @_ is deprecated at /usr/local/lib/perl5/site +_perl/5.6.1/DNS/ line 220. Use of implicit split to @_ is deprecated at /usr/local/lib/perl5/site +_perl/5.6.1/DNS/ line 240. Use of implicit split to @_ is deprecated at /usr/local/lib/perl5/site +_perl/5.6.1/DNS/ line 260. Explicit blessing to '' (assuming package main) at /usr/local/lib/perl +5/site_perl/5.6.1/DNS/ line 133. Can't locate object method "readZoneFile" via package "main" (perhaps +you forgot to load "main"?) at /usr/local/lib/perl5/site_perl/5.6.1/D +NS/ line 139.

Not sure how to interpret this error message...

What I'm trying to accomplish is to make a script to read a bind 8 named.conf file and tell me the filename for each master zone.


In reply to DNS::ZoneFile by naChoZ

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2023-11-29 15:56 GMT
Find Nodes?
    Voting Booth?

    No recent polls found