Hello community,

here is the log from the commit of package perl-Net-DNS-Resolver-Programmable 
for openSUSE:Factory checked in at 2017-09-05 15:13:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Net-DNS-Resolver-Programmable (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Net-DNS-Resolver-Programmable.new 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Net-DNS-Resolver-Programmable"

Tue Sep  5 15:13:56 2017 rev:14 rq:520471 version:0.009

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Net-DNS-Resolver-Programmable/perl-Net-DNS-Resolver-Programmable.changes
    2015-01-03 22:03:02.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Net-DNS-Resolver-Programmable.new/perl-Net-DNS-Resolver-Programmable.changes
       2017-09-05 15:13:58.643718678 +0200
@@ -1,0 +2,53 @@
+Tue Jul 25 05:56:04 UTC 2017 - co...@suse.com
+
+- updated to 0.009
+   see /usr/share/doc/packages/perl-Net-DNS-Resolver-Programmable/CHANGES
+
+  --- 0.009 (2017-07-24)
+    + Cleaner way to handle both arrays of strings and Net::DNS::Packet 
objects,
+      courtesy of NLNETLABS (Dick Franks) in RT 122542 - thanks!
+    + Extend tests to cover non-mocked queries too
+  
+  --- 0.008 (2017-07-21)
+    * Add Scalar::Util to deps
+  
+  --- 0.007 (2017-07-19)
+    * Fix handling pre-prepared ::Packet objects passed to send()
+    + Additional tests
+
+- remove Net-DNS-Resolver-Net-DNS-0.75.patch
+
+-------------------------------------------------------------------
+Mon Jul 17 05:53:13 UTC 2017 - co...@suse.com
+
+- updated to 0.006
+   see /usr/share/doc/packages/perl-Net-DNS-Resolver-Programmable/CHANGES
+
+  --- 0.006 (2017-07-16)
+    * Don't demand 5.10, work on perl >= 5.6
+    * No taint mode flag in t/01-basic.t
+    * Avoid problems with our $VERSION = '...' on one line
+    All these courtesy of Dick Franks (rwfranks) - thanks!
+
+-------------------------------------------------------------------
+Fri Jul 14 05:51:18 UTC 2017 - co...@suse.com
+
+- updated to 0.005
+   see /usr/share/doc/packages/perl-Net-DNS-Resolver-Programmable/CHANGES
+
+  --- 0.005 (2017-07-13)
+  
+    * Remove debian/ subdir as per RT #108522
+    * Regenerate README via pod2readme
+    * Fix version number in changelog entry below - d'oh - and remove
+      use of deprecated qv()
+    * Import rcode list from Net::DNS - RT 96390
+  
+  
+  --- 0.004 (2017-07-13)
+  
+    * BIGPRESH taking over maintainership of this seemingly orphaned but
+      very useful distribution.  Plan to fix various RT tickets.
+    * Fix RT 109266 - avoid deprecated make_query_packet() call
+
+-------------------------------------------------------------------

Old:
----
  Net-DNS-Resolver-Net-DNS-0.75.patch
  Net-DNS-Resolver-Programmable-v0.003.tar.gz

New:
----
  Net-DNS-Resolver-Programmable-0.009.tar.gz
  cpanspec.yml

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Net-DNS-Resolver-Programmable.spec ++++++
--- /var/tmp/diff_new_pack.XRW6hx/_old  2017-09-05 15:13:59.371616362 +0200
+++ /var/tmp/diff_new_pack.XRW6hx/_new  2017-09-05 15:13:59.375615800 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Net-DNS-Resolver-Programmable
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,60 +17,48 @@
 
 
 Name:           perl-Net-DNS-Resolver-Programmable
+Version:        0.009
+Release:        0
 %define cpan_name Net-DNS-Resolver-Programmable
-Summary:        Programmable DNS resolver class for offline emulation of DNS
-License:        Artistic-1.0
+Summary:        Programmable Dns Resolver Class for Offline
+License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
-Version:        0.003
-Release:        0
-Url:            http://search.cpan.org/dist/Net-DNS-Resolver-Programmable
-Source:         
http://search.cpan.org/CPAN/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/Net-DNS-Resolver-Programmable-v0.003.tar.gz
-Patch0:         Net-DNS-Resolver-Net-DNS-0.75.patch
+Url:            http://search.cpan.org/dist/Net-DNS-Resolver-Programmable/
+Source0:        
https://cpan.metacpan.org/authors/id/B/BI/BIGPRESH/%{cpan_name}-%{version}.tar.gz
+Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(Module::Build) >= 0.2805
-BuildRequires:  perl(Net::DNS)
-Requires:       perl(Net::DNS)
+BuildRequires:  perl(Net::DNS) >= 0.69
+Requires:       perl(Net::DNS) >= 0.69
+%{perl_requires}
 
 %description
-Net::DNS::Resolver::Programmable is a Net::DNS::Resolver descendant class that
-allows a virtual DNS to be emulated instead of querying the real DNS.  A set of
-static DNS records may be supplied, or arbitrary code may be specified as a
-means for retrieving DNS records, or even generating them on the fly.
-
-
-Authors:
---------
-    Julian Mehnle
+*Net::DNS::Resolver::Programmable* is a *Net::DNS::Resolver* descendant
+class that allows a virtual DNS to be emulated instead of querying the real
+DNS. A set of static DNS records may be supplied, or arbitrary code may be
+specified as a means for retrieving DNS records, or even generating them on
+the fly.
 
 %prep
-%setup -q -n %{cpan_name}-v%{version}
-%patch0 -p1
+%setup -q -n %{cpan_name}-%{version}
 
 %build
-%{__perl} Build.PL --prefix $RPM_BUILD_ROOT/usr --installdirs vendor
-./Build
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__make} %{?_smp_mflags}
 
 %check
-./Build test
+%{__make} test
 
 %install
-./Build install
-# do not perl_process_packlist (noarch)
-# remove .packlist file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
-# remove perllocal.pod file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
+%perl_make_install
+%perl_process_packlist
 %perl_gen_filelist
 
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
 %files  -f %{name}.files
-%defattr(-,root,root)
-%doc CHANGES LICENSE README SIGNATURE
+%defattr(-,root,root,755)
+%doc CHANGES README TODO
+%license LICENSE
 
 %changelog

++++++ Net-DNS-Resolver-Programmable-v0.003.tar.gz -> 
Net-DNS-Resolver-Programmable-0.009.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/Build.PL 
new/Net-DNS-Resolver-Programmable-0.009/Build.PL
--- old/Net-DNS-Resolver-Programmable-v0.003/Build.PL   2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/Build.PL    1970-01-01 
01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-use Module::Build;
-
-my $build = Module::Build->new(
-    module_name     => 'Net::DNS::Resolver::Programmable',
-    dist_author     => 'Julian Mehnle <jul...@mehnle.net>',
-    license         => 'perl',
-    requires        => {
-        # Core requirements:
-        perl            => 0,
-        version         => 0,
-        Net::DNS        => 0
-    },
-    recommends      => {
-    },
-    build_requires  => {
-        # Build-only requirements:
-        Module::Build   => '0.2805'
-    },
-    create_makefile_pl
-                    => 'passthrough',
-    sign            => 1
-);
-
-$build->create_build_script();
-
-# $Id: Build.PL 13 2007-05-30 22:12:35Z julian $
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/CHANGES 
new/Net-DNS-Resolver-Programmable-0.009/CHANGES
--- old/Net-DNS-Resolver-Programmable-v0.003/CHANGES    2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/CHANGES     2017-07-24 
23:02:30.000000000 +0200
@@ -4,6 +4,40 @@
 #   ! = Changed something significant, or removed a feature
 #   * = Fixed a bug, or made a minor improvement
 
+--- 0.009 (2017-07-24)
+  + Cleaner way to handle both arrays of strings and Net::DNS::Packet objects,
+    courtesy of NLNETLABS (Dick Franks) in RT 122542 - thanks!
+  + Extend tests to cover non-mocked queries too
+
+--- 0.008 (2017-07-21)
+  * Add Scalar::Util to deps
+
+--- 0.007 (2017-07-19)
+  * Fix handling pre-prepared ::Packet objects passed to send()
+  + Additional tests
+
+--- 0.006 (2017-07-16)
+  * Don't demand 5.10, work on perl >= 5.6
+  * No taint mode flag in t/01-basic.t
+  * Avoid problems with our $VERSION = '...' on one line
+  All these courtesy of Dick Franks (rwfranks) - thanks! 
+
+--- 0.005 (2017-07-13)
+
+  * Remove debian/ subdir as per RT #108522
+  * Regenerate README via pod2readme
+  * Fix version number in changelog entry below - d'oh - and remove
+    use of deprecated qv()
+  * Import rcode list from Net::DNS - RT 96390
+
+
+--- 0.004 (2017-07-13)
+
+  * BIGPRESH taking over maintainership of this seemingly orphaned but
+    very useful distribution.  Plan to fix various RT tickets.
+  * Fix RT 109266 - avoid deprecated make_query_packet() call
+
+
 --- 0.003 (2007-05-30 22:00)
 
   Miscellaneous:
@@ -35,5 +69,5 @@
 
 --- 0.001 (initial release) (2006-10-23 00:00)
 
-# $Id: CHANGES 13 2007-05-30 22:12:35Z julian $
+
 # vim:sts=2 sw=2 et tw=79
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/INSTALL 
new/Net-DNS-Resolver-Programmable-0.009/INSTALL
--- old/Net-DNS-Resolver-Programmable-v0.003/INSTALL    2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/INSTALL     2017-07-13 
22:27:30.000000000 +0200
@@ -26,5 +26,5 @@
   ./Build test
   ./Build install
 
-# $Id: README 167 2005-01-17 18:26:45Z julian $
+
 # vim:tw=79
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/MANIFEST 
new/Net-DNS-Resolver-Programmable-0.009/MANIFEST
--- old/Net-DNS-Resolver-Programmable-v0.003/MANIFEST   2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/MANIFEST    2017-07-13 
23:49:14.000000000 +0200
@@ -1,16 +1,11 @@
-Build.PL
 CHANGES
-debian/changelog
-debian/compat
-debian/control
-debian/copyright
-debian/rules
 INSTALL
 lib/Net/DNS/Resolver/Programmable.pm
+t/01-basic.t
 LICENSE
 Makefile.PL
 MANIFEST                       This list of files
 META.yml
 README
 TODO
-SIGNATURE    Added here by Module::Build
+META.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/META.json 
new/Net-DNS-Resolver-Programmable-0.009/META.json
--- old/Net-DNS-Resolver-Programmable-v0.003/META.json  1970-01-01 
01:00:00.000000000 +0100
+++ new/Net-DNS-Resolver-Programmable-0.009/META.json   2017-07-24 
23:02:50.000000000 +0200
@@ -0,0 +1,51 @@
+{
+   "abstract" : "programmable DNS resolver class for offline emulation of DNS",
+   "author" : [
+      "David Precious <dav...@preshweb.co.uk>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter 
version 2.143240",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
+      "version" : "2"
+   },
+   "name" : "Net-DNS-Resolver-Programmable",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "Test::More" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Net::DNS" : "0.69",
+            "perl" : "5.006"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "bugtracker" : {
+         "web" : 
"https://github.com/bigpresh/Net-DNS-Resolver-Programmable/issues";
+      },
+      "homepage" : "https://github.com/bigpresh/Net-DNS-Resolver-Programmable";,
+      "repository" : {
+         "url" : "https://github.com/bigpresh/Net-DNS-Resolver-Programmable";
+      }
+   },
+   "version" : "0.009"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/META.yml 
new/Net-DNS-Resolver-Programmable-0.009/META.yml
--- old/Net-DNS-Resolver-Programmable-v0.003/META.yml   2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/META.yml    2017-07-24 
23:02:50.000000000 +0200
@@ -1,25 +1,27 @@
 ---
-name: Net-DNS-Resolver-Programmable
-version: v0.003
+abstract: 'programmable DNS resolver class for offline emulation of DNS'
 author:
-  - 'Julian Mehnle <jul...@mehnle.net>'
-abstract: |-
-  programmable DNS resolver class for offline
-  emulation of DNS
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
-requires:
-  Net::DNS: 0
-  perl: 0
-  version: 0
+  - 'David Precious <dav...@preshweb.co.uk>'
 build_requires:
-  Module::Build: 0.2805
-provides:
-  Net::DNS::Resolver::Programmable:
-    file: lib/Net/DNS/Resolver/Programmable.pm
-    version: v0.003
-generated_by: Module::Build version 0.2808
+  Test::More: '0'
+configure_requires:
+  ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 
2.143240'
+license: perl
 meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: '1.4'
+name: Net-DNS-Resolver-Programmable
+no_index:
+  directory:
+    - t
+    - inc
+requires:
+  Net::DNS: '0.69'
+  perl: '5.006'
+resources:
+  bugtracker: https://github.com/bigpresh/Net-DNS-Resolver-Programmable/issues
+  homepage: https://github.com/bigpresh/Net-DNS-Resolver-Programmable
+  repository: https://github.com/bigpresh/Net-DNS-Resolver-Programmable
+version: '0.009'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/Makefile.PL 
new/Net-DNS-Resolver-Programmable-0.009/Makefile.PL
--- old/Net-DNS-Resolver-Programmable-v0.003/Makefile.PL        2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/Makefile.PL 2017-07-24 
23:00:10.000000000 +0200
@@ -1,31 +1,32 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
-    
-    unless (eval "use Module::Build::Compat 0.02; 1" ) {
-      print "This module requires Module::Build to install itself.\n";
-      
-      require ExtUtils::MakeMaker;
-      my $yn = ExtUtils::MakeMaker::prompt
-       ('  Install Module::Build now from CPAN?', 'y');
-      
-      unless ($yn =~ /^y/i) {
-       die " *** Cannot install without Module::Build.  Exiting ...\n";
-      }
-      
-      require Cwd;
-      require File::Spec;
-      require CPAN;
-      
-      # Save this 'cause CPAN will chdir all over the place.
-      my $cwd = Cwd::cwd();
-      
-      CPAN::Shell->install('Module::Build::Compat');
-      CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
-       or die "Couldn't install Module::Build, giving up.\n";
-      
-      chdir $cwd or die "Cannot chdir() back to $cwd: $!";
-    }
-    eval "use Module::Build::Compat 0.02; 1" or die $@;
-    
-    Module::Build::Compat->run_build_pl(args => \@ARGV);
-    require Module::Build;
-    Module::Build::Compat->write_makefile(build_class => 'Module::Build');
+use 5.006;
+use strict;
+use warnings FATAL => 'all';
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    NAME             => 'Net::DNS::Resolver::Programmable',
+    AUTHOR           => q{David Precious <dav...@preshweb.co.uk>},
+    VERSION_FROM     => 'lib/Net/DNS/Resolver/Programmable.pm',
+    ABSTRACT_FROM    => 'lib/Net/DNS/Resolver/Programmable.pm',
+    LICENSE          => 'perl',
+    PL_FILES         => {},
+    MIN_PERL_VERSION => 5.006,
+    CONFIGURE_REQUIRES => {
+        'ExtUtils::MakeMaker' => 0,
+    },
+    BUILD_REQUIRES => {
+        'Test::More' => 0,
+    },
+    PREREQ_PM => {
+        'Net::DNS'       => 0.69,
+    },
+    dist  => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    clean => { FILES => 'Net-DNS-Resolver-Programmable-*' },
+    META_MERGE => {
+        resources => {
+            repository => 
'https://github.com/bigpresh/Net-DNS-Resolver-Programmable',
+            bugtracker => 
'https://github.com/bigpresh/Net-DNS-Resolver-Programmable/issues',
+            homepage   => 
'https://github.com/bigpresh/Net-DNS-Resolver-Programmable',
+        },
+    },
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/README 
new/Net-DNS-Resolver-Programmable-0.009/README
--- old/Net-DNS-Resolver-Programmable-v0.003/README     2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/README      2017-07-13 
23:23:21.000000000 +0200
@@ -1,29 +1,170 @@
-Net::DNS::Resolver::Programmable 0.003
-A Net::DNS::Resolver descendant class for offline emulation of DNS
-(C) 2006-2007 Julian Mehnle <jul...@mehnle.net>
-<http://search.cpan.org/dist/Net-DNS-Resolver-Programmable>
-==============================================================================
-
-Net::DNS::Resolver::Programmable is a Net::DNS::Resolver descendant class that
-allows a virtual DNS to be emulated instead of querying the real DNS.  A set of
-static DNS records may be supplied, or arbitrary code may be specified as a
-means for retrieving DNS records, or even generating them on the fly.
-
-Reporting Bugs
---------------
-
-Please report bugs in Net::DNS::Resolver::Programmable to the CPAN bug tracker:
-<http://rt.cpan.org/Public/Dist/Display.html?Name=Net-DNS-Resolver-Programmable>
-
-License
--------
-
-Net::DNS::Resolver::Programmable is free software.  You may use, modify, and
-distribute it under the same terms as Perl itself, that is under the terms of
-either the GNU General Public License (version 2 or later) or the Artistic
-License.
+NAME
 
-The complete text of these licenses can be found in the LICENSE file.
+    Net::DNS::Resolver::Programmable - programmable DNS resolver class for
+    offline emulation of DNS
+
+SYNOPSIS
+
+        use Net::DNS::Resolver::Programmable;
+        use Net::DNS::RR;
+        
+        my $resolver = Net::DNS::Resolver::Programmable->new(
+            records         => {
+                'example.com'     => [
+                    Net::DNS::RR->new('example.com.     NS  ns.example.org.'),
+                    Net::DNS::RR->new('example.com.     A   192.168.0.1')
+                ],
+                'ns.example.org'  => [
+                    Net::DNS::RR->new('ns.example.org.  A   192.168.1.1')
+                ]
+            },
+            
+            resolver_code   => sub {
+                my ($domain, $rr_type, $class) = @_;
+                ...
+                return ($result, $aa, @rrs);
+            }
+        );
+
+DESCRIPTION
+
+    Net::DNS::Resolver::Programmable is a Net::DNS::Resolver descendant
+    class that allows a virtual DNS to be emulated instead of querying the
+    real DNS. A set of static DNS records may be supplied, or arbitrary
+    code may be specified as a means for retrieving DNS records, or even
+    generating them on the fly.
+
+ Constructor
+
+    The following constructor is provided:
+
+    new(%options): returns Net::DNS::Resolver::Programmable
+
+      Creates a new programmed DNS resolver object.
+
+      %options is a list of key/value pairs representing any of the
+      following options:
+
+      records
+
+       A reference to a hash of arrays containing a static set of
+       Net::DNS::RR objects. The hash entries must be indexed by fully
+       qualified domain names (lower-case, without any trailing dots), and
+       the entries themselves must be arrays of the RR objects pertaining
+       to these domain names. For example:
+
+            records => {
+                'example.com'     => [
+                    Net::DNS::RR->new('example.com.     NS  ns.example.org.'),
+                    Net::DNS::RR->new('example.com.     A   192.168.0.1')
+                ],
+                'www.example.com' => [
+                    Net::DNS::RR->new('www.example.com. A   192.168.0.2')
+                ],
+                'ns.example.org'  => [
+                    Net::DNS::RR->new('ns.example.org.  A   192.168.1.1')
+                ]
+            }
+
+       If this option is specified, the resolver retrieves requested RRs
+       from this data structure.
+
+      resolver_code
+
+       A code reference used as a call-back for dynamically retrieving
+       requested RRs.
+
+       The code must take the following query parameters as arguments: the
+       domain, RR type, and class.
+
+       It must return a list composed of: the response's RCODE (by name,
+       as returned by Net::DNS::Header->rcode), the aa (authoritative
+       answer) flag (boolean, use undef if you don't care), and the
+       Net::DNS::RR answer objects. If an error string is returned instead
+       of a valid RCODE, a Net::DNS::Packet object is not constructed but
+       an error condition for the resolver is signaled instead.
+
+       For example:
+
+            resolver_code => sub {
+                my ($domain, $rr_type, $class) = @_;
+                ...
+                return ($result, $aa, @rrs);
+            }
+
+       If both this and the records option are specified, then statically
+       programmed records are used in addition to any that are returned by
+       the configured resolver code.
+
+      defnames
+
+      dnsrch
+
+      domain
+
+      searchlist
+
+      debug
+
+       These Net::DNS::Resolver options are also meaningful with
+       Net::DNS::Resolver::Programmable. See Net::DNS::Resolver for their
+       descriptions.
+
+ Instance methods
+
+    The following instance methods of Net::DNS::Resolver are also supported
+    by Net::DNS::Resolver::Programmable:
+
+    search: returns Net::DNS::Packet
+
+    query: returns Net::DNS::Packet
+
+    send: returns Net::DNS::Packet
+
+      Performs an offline DNS query, using the statically programmed DNS
+      RRs and/or the configured dynamic resolver code. See the "new"
+      constructor's records and resolver_code options. See the descriptions
+      of search, query, and send for details about the calling syntax of
+      these methods.
+
+    print
+
+    string: returns string
+
+    searchlist: returns list of string
+
+    defnames: returns boolean
+
+    dnsrch: returns boolean
+
+    debug: returns boolean
+
+    errorstring: returns string
+
+    answerfrom: returns string
+
+    answersize: returns integer
+
+      See "METHODS" in Net::DNS::Resolver.
+
+    Currently the following methods of Net::DNS::Resolver are not
+    supported: axfr, axfr_start, axfr_next, nameservers, port, srcport,
+    srcaddr, bgsend, bgread, bgisready, tsig, retrans, retry, recurse,
+    usevc, tcp_timeout, udp_timeout, persistent_tcp, persistent_udp, igntc,
+    dnssec, cdflag, udppacketsize. The effects of using these on
+    Net::DNS::Resolver::Programmable objects are undefined.
+
+SEE ALSO
+
+    Net::DNS::Resolver
+
+    For availability, support, and license information, see the README file
+    included with Net::DNS::Resolver::Programmable.
+
+AUTHORS
+
+    David Precious (BIGPRESH) <dav...@preshweb.co.uk> took on
+    maintainership in July 2017
+
+    Original author Julian Mehnle <jul...@mehnle.net>
 
-# $Id: README 13 2007-05-30 22:12:35Z julian $
-# vim:tw=79
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/SIGNATURE 
new/Net-DNS-Resolver-Programmable-0.009/SIGNATURE
--- old/Net-DNS-Resolver-Programmable-v0.003/SIGNATURE  2007-05-31 
00:27:30.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/SIGNATURE   1970-01-01 
01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.55.
-
-To verify the content in this distribution, first make sure you have
-Module::Signature installed, then type:
-
-    % cpansign -v
-
-It will check each file's integrity, as well as the signature's
-validity.  If "==> Signature verified OK! <==" is not displayed,
-the distribution may already have been compromised, and you should
-not run its Makefile.PL or Build.PL.
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-SHA1 6667d40a9f575b1212f1a46d0ffaf28a6cf4aaad Build.PL
-SHA1 56c7b6a9ed1c29306cfeb7a4f6326a7d078cc5d3 CHANGES
-SHA1 25c1c47d9e56d10ef12a41fd78b373cc4ab99f9f INSTALL
-SHA1 285c6bc69d15ed10dcf4dbf7861ddb61d09df6b4 LICENSE
-SHA1 42e50523da075bbbdc9491d4d074afd27ab1d3f2 MANIFEST
-SHA1 581129e74e3f48b146248e77cd775bfb90dbd6ac META.yml
-SHA1 cd14ada78fb37a0d926edd86eddcdf7f939de582 Makefile.PL
-SHA1 e2dca005986fdbfd6eb2240ac52d89920077879f README
-SHA1 dbf5ce8e0302d12e939ba4936fe71427bd6cefb6 TODO
-SHA1 6ac9c4e41735c6587cf2e7616948a22c80c02b46 debian/changelog
-SHA1 5d9474c0309b7ca09a182d888f73b37a8fe1362c debian/compat
-SHA1 d9c76895d8eff04cc6ede6465d999e5a8b3c6ad3 debian/control
-SHA1 c0bec3c995ee5445fb5be256115f4f55f15c4d1f debian/copyright
-SHA1 77462c6344dafe249fa18f4648f8a10b86bb1e95 debian/rules
-SHA1 8fcde075c9d97404737eaef0d18b6183ed0033a7 
lib/Net/DNS/Resolver/Programmable.pm
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-iD8DBQFGXfpSwL7PKlBZWjsRAoYmAJ9fioNaRaq36z12c8fBArk/baFDVACeJDLJ
-xEavVe2gFKJRqA/DzTgPXQk=
-=Yv11
------END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/TODO 
new/Net-DNS-Resolver-Programmable-0.009/TODO
--- old/Net-DNS-Resolver-Programmable-v0.003/TODO       2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/TODO        2017-07-13 
22:27:30.000000000 +0200
@@ -4,5 +4,5 @@
 #   ! = Change something significant, or remove a feature
 #   * = Fix a bug, or make a minor improvement
 
-# $Id: TODO 2 2006-10-22 23:20:28Z julian $
+
 # vim:sts=2 sw=2 et tw=79
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Net-DNS-Resolver-Programmable-v0.003/debian/changelog 
new/Net-DNS-Resolver-Programmable-0.009/debian/changelog
--- old/Net-DNS-Resolver-Programmable-v0.003/debian/changelog   2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/debian/changelog    1970-01-01 
01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
-libnet-dns-resolver-programmable-perl (0.003) unstable; urgency=low
-
-  * Depends: libnet-dns-perl
-  * Dropped build dependency on libtest-simple-perl for now.  There are
-    currently no tests.
-
- -- Julian Mehnle <jul...@mehnle.net>  Wed, 30 May 2007 22:03:19 +0000
-
-libnet-dns-resolver-programmable-perl (0.002.2) unstable; urgency=low
-
-  * Slightly adjusted license statement in debian/copyright.
-
- -- Julian Mehnle <jul...@mehnle.net>  Tue,  9 Jan 2007 13:00:00 +0000
-
-libnet-dns-resolver-programmable-perl (0.002.1) unstable; urgency=low
-
-  ! Depends, Build-Depends-Indep: libversion-perl
-  * Correctly handle undefined result code returned by custom resolver code.
-
- -- Julian Mehnle <jul...@mehnle.net>  Wed, 15 Nov 2006 15:30:00 +0000
-
-libnet-dns-resolver-programmable-perl (0.002) unstable; urgency=low
-
-  + Support non-RCODE strings to be returned by custom resolver code, which is
-    then taken as the resolver's error string.
-  * Do not fold identical returned RRs into a single RR.
-  * Minor documentation fixes.
-
- -- Julian Mehnle <jul...@mehnle.net>  Wed, 15 Nov 2006 03:45:00 +0000
-
-libnet-dns-resolver-programmable-perl (0.001) unstable; urgency=low
-
-  * Initial Release.
-
- -- Julian Mehnle <jul...@mehnle.net>  Mon, 01 Jan 2005 01:00:00 +0100
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/debian/compat 
new/Net-DNS-Resolver-Programmable-0.009/debian/compat
--- old/Net-DNS-Resolver-Programmable-v0.003/debian/compat      2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/debian/compat       1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/debian/control 
new/Net-DNS-Resolver-Programmable-0.009/debian/control
--- old/Net-DNS-Resolver-Programmable-v0.003/debian/control     2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/debian/control      1970-01-01 
01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-Source: libnet-dns-resolver-programmable-perl
-Section: perl
-Priority: optional
-Maintainer: Julian Mehnle <jul...@mehnle.net>
-Build-Depends: debhelper (>= 5)
-Build-Depends-Indep: perl (>= 5.6), libmodule-build-perl (>= 0.26), 
libversion-perl
-Standards-Version: 3.7.2
-
-Package: libnet-dns-resolver-programmable-perl
-Architecture: all
-Depends: ${perl:Depends}, libversion-perl, libnet-dns-perl, ${misc:Depends}
-Description: programmable DNS resolver class for offline emulation of DNS
- Net::DNS::Resolver::Programmable is a Net::DNS::Resolver descendant class that
- allows a virtual DNS to be emulated instead of querying the real DNS.  A set
- of static DNS records may be supplied, or arbitrary code may be specified as a
- means for retrieving DNS records, or even generating them on the fly.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Net-DNS-Resolver-Programmable-v0.003/debian/copyright 
new/Net-DNS-Resolver-Programmable-0.009/debian/copyright
--- old/Net-DNS-Resolver-Programmable-v0.003/debian/copyright   2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/debian/copyright    1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-This is the Debian package for the Net-DNS-Resolver-Programmable CPAN
-distribution, which is available from <http://search.cpan.org/dist/Net-DNS-
-Resolver-Programmable>.
-
-(C) 2006-2007 Julian Mehnle <jul...@mehnle.net>.  Julian Mehnle is the upstream
-author as well as the maintainer of the Debian package.
-
-This is free software.  You may use, modify, and distribute it under the same
-terms as Perl itself, that is under the terms of either the GNU General Public
-License (version 2 or later) or the Artistic License.
-
-On Debian GNU/Linux systems, the complete text of these licenses can be found
-in these files:
-  /usr/share/common-licenses/GPL-2
-  /usr/share/common-licenses/Artistic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/debian/rules 
new/Net-DNS-Resolver-Programmable-0.009/debian/rules
--- old/Net-DNS-Resolver-Programmable-v0.003/debian/rules       2007-05-31 
00:27:27.000000000 +0200
+++ new/Net-DNS-Resolver-Programmable-0.009/debian/rules        1970-01-01 
01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-#!/usr/bin/make -f
-
-PACKAGE = $(shell dh_listpackages)
-
-ifndef PERL
-    PERL = /usr/bin/perl
-endif
-
-TMP = $(CURDIR)/debian/$(PACKAGE)
-
-BUILD = ./Build
-
-build: build-stamp
-build-stamp:
-       dh_testdir
-       $(PERL) Build.PL installdirs=vendor
-       $(BUILD)
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       [ ! -f $(BUILD) ] || $(BUILD) distclean
-       dh_clean build-stamp install-stamp
-
-install: install-stamp
-install-stamp: build-stamp
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       
-       $(BUILD) test
-       $(BUILD) install destdir=$(TMP) create_packlist=0
-       
-       touch install-stamp
-
-# Build architecture-independent files here:
-binary-indep: build install
-       dh_testdir
-       dh_testroot
-       
-       dh_install
-       #dh_installdirs
-       dh_installdocs README TODO
-       dh_installchangelogs CHANGES
-       #dh_installexamples -XCVS examples/*
-       #dh_installman
-       #dh_link
-       
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_perl
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-# Build architecture-dependent files here:
-binary-arch:
-       # Nothing to do.
-
-binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Net-DNS-Resolver-Programmable-v0.003/lib/Net/DNS/Resolver/Programmable.pm 
new/Net-DNS-Resolver-Programmable-0.009/lib/Net/DNS/Resolver/Programmable.pm
--- 
old/Net-DNS-Resolver-Programmable-v0.003/lib/Net/DNS/Resolver/Programmable.pm   
    2007-05-31 00:27:27.000000000 +0200
+++ 
new/Net-DNS-Resolver-Programmable-0.009/lib/Net/DNS/Resolver/Programmable.pm    
    2017-07-24 23:00:50.000000000 +0200
@@ -3,7 +3,8 @@
 # A Net::DNS::Resolver descendant class for offline emulation of DNS
 #
 # (C) 2006-2007 Julian Mehnle <jul...@mehnle.net>
-# $Id: Programmable.pm 13 2007-05-30 22:12:35Z julian $
+# Maintained from 2017 by David Precious (BIGPRESH) <dav...@preshweb.co.uk>
+
 #
 ##############################################################################
 
@@ -14,24 +15,28 @@
 Net::DNS::Resolver::Programmable - programmable DNS resolver class for offline
 emulation of DNS
 
-=head1 VERSION
-
-0.003
 
 =cut
 
-use version; our $VERSION = qv('0.003');
+
+our $VERSION;
+$VERSION = '0.009';
 
 use warnings;
 use strict;
 
+use Net::DNS;
 use base 'Net::DNS::Resolver';
 
-use Net::DNS::Packet;
 
 use constant TRUE   => (0 == 0);
 use constant FALSE  => not TRUE;
 
+my %rcode = map { $_ => 1 } qw(NOERROR FORMERR SERVFAIL NXDOMAIN NOTIMP
+        REFUSED YXDOMAIN YXRRSET NXRRSET NOTAUTH NOTZONE BADVERS
+        BADSIG BADKEY BADTIME BADMODE BADNAME BADALG BADTRUNC);
+
+
 # Interface:
 ##############################################################################
 
@@ -154,10 +159,10 @@
 =cut
 
 sub new {
-    my ($self, %options) = @_;
+    my ($class, %options) = @_;
     
     # Create new object:
-    $self = $self->SUPER::new(%options);
+    my $self = $class->SUPER::new(%options);
     
     $self->{records}       = $options{records};
     $self->{resolver_code} = $options{resolver_code};
@@ -191,8 +196,12 @@
 sub send {
     my $self = shift;
     
-    my $query_packet = $self->make_query_packet(@_);
-    my $question = ($query_packet->question)[0];
+    # We could be passed a Net::DNS::Packet object, or an array of strings
+    my ($query) = @_;
+    $query = Net::DNS::Packet->new(@_) unless ref ($query);
+
+    my ($question) = $query->question;
+
     my $domain   = lc($question->qname);
     my $rr_type  = $question->qtype;
     my $class    = $question->qclass;
@@ -205,7 +214,7 @@
         ($result, $aa, @answer_rrs) = $resolver_code->($domain, $rr_type, 
$class);
     }
     
-    if (not defined($result) or defined($Net::DNS::rcodesbyname{$result})) {
+    if ( not defined($result) or defined($rcode{$result}) ) {
         # Valid RCODE, return a packet:
         
         $aa     = TRUE      if not defined($aa);
@@ -222,13 +231,12 @@
             }
         }
         
-        my $packet = Net::DNS::Packet->new($domain, $rr_type, $class);
-        $packet->header->qr(TRUE);
-        $packet->header->rcode($result);
-        $packet->header->aa($aa);
-        $packet->push(answer => @answer_rrs);
+        my $response_packet = $query->reply;
+        $response_packet->header->rcode($result);
+        $response_packet->header->aa($aa);
+        $response_packet->push(answer => @answer_rrs);
         
-        return $packet;
+        return $response_packet;
     }
     else {
         # Invalid RCODE, signal error condition by not returning a packet:
@@ -276,7 +284,20 @@
 
 =head1 AUTHORS
 
-Julian Mehnle <jul...@mehnle.net>
+David Precious (BIGPRESH) C<< <dav...@preshweb.co.uk> >> took on maintainership
+in July 2017
+
+Original author Julian Mehnle C<< <jul...@mehnle.net> >>
+
+=head1 ACKNOWLEDGEMENTS
+
+Dick Franks (rwfranks)
+
+(This section was added by BIGPRESH in July 2017, so currently omits
+acknowledgements for those who contributed things in the past; I may
+retrospectively add them in future.)
+
+
 
 =cut
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-Resolver-Programmable-v0.003/t/01-basic.t 
new/Net-DNS-Resolver-Programmable-0.009/t/01-basic.t
--- old/Net-DNS-Resolver-Programmable-v0.003/t/01-basic.t       1970-01-01 
01:00:00.000000000 +0100
+++ new/Net-DNS-Resolver-Programmable-0.009/t/01-basic.t        2017-07-24 
22:54:59.000000000 +0200
@@ -0,0 +1,102 @@
+#!perl
+use 5.006;
+use strict;
+use warnings FATAL => 'all';
+use Test::More;
+
+plan tests => 17;
+
+use Net::DNS::Resolver::Programmable;
+
+
+diag(
+    "Testing Net::DNS::Resolver::Programmable "
+    . $Net::DNS::Resolver::Programmable::VERSION .", Perl $], $^X"
+);
+
+
+my $domain = "example.com";
+my $fake_ns = "ns1.$domain";
+# Set up resolver with a fake record
+my $resolver = Net::DNS::Resolver::Programmable->new(
+    records         => {
+        'example.com'     => [
+            Net::DNS::RR->new("$domain. 86400  A  127.0.0.5"),
+            Net::DNS::RR->new("$domain. 86400 NS $fake_ns."),
+        ],
+        'ns1.example.com' => [
+            Net::DNS::RR->new("$fake_ns. 86400 A 127.0.0.6"),
+        ],
+    },
+);
+
+# Check that we get that fake record
+my $reply = $resolver->query($domain);
+
+is(ref($reply), "Net::DNS::Packet", "Got a Net::DNS::Packet back for $domain");
+
+my ($rr) = $reply->answer;
+
+is($rr->type, "A", "Got a Net::DNS::RR::A object");
+is($rr->address, "127.0.0.5", "Correct answer for $domain as mocked");
+
+# Ditto for the address of our fake NS
+$reply = $resolver->query($fake_ns);
+
+is(ref($reply), "Net::DNS::Packet", "Got a Net::DNS::Packet back for 
$fake_ns");
+
+($rr) = $reply->answer;
+
+is($rr->type, "A", "Got a Net::DNS::RR::A object for $fake_ns");
+is($rr->address, "127.0.0.6", "Correct answer as mocked for $fake_ns");
+
+
+# And an NS lookup works, too
+$reply = $resolver->query($domain, 'NS');
+
+is(ref($reply), "Net::DNS::Packet",
+    "Got a Net::DNS::Packet back for NS $domain");
+
+($rr) = $reply->answer;
+
+is($rr->type, "NS", "Got a Net::DNS::RR::NS object for NS $domain");
+is($rr->nsdname, $fake_ns, "Correct NS answer as mocked for $domain");
+
+
+# We can also do a lookup by passing in a Net::DNS::Packet object
+my $packet = Net::DNS::Packet->new($domain, "A", "IN");
+$reply = $resolver->send($packet);
+is(ref($reply), "Net::DNS::Packet",
+    "got a Packet object back from send(\$packet)");
+($rr) = $reply->answer;
+ok($rr, "Got an answer in that packet");
+is ($rr->type, "A", 
+    "Got a Net::DNS::RR::A object for $domain from send(\$packet)");
+is($rr->address, "127.0.0.5", "... and it contains the expected answer");
+
+my $unmocked = "www.google.com";
+
+# A query() that shouldn't match any of the mocked entries we set up
+# gets undef
+$reply = $resolver->query($unmocked);
+
+ok(!$reply, "No reply for a query() on unmocked name $unmocked");
+
+
+# send() on the other hand gets a packet back with the expected rcode
+$reply = $resolver->send($unmocked);
+
+is(ref($reply),
+    "Net::DNS::Packet",
+    "Got a Net::DNS::Packet back from send() on unmocked name $unmocked",
+);
+
+is(
+    $reply->header->rcode,
+    "NOERROR",
+    "Expected NOERROR rcode for lookup that doesn't match mocks",
+);
+
+($rr) = $reply->answer;
+
+is($rr, undef, "No answer for lookup that doesn't match mocks");

++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#description: |-
#  override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
#  - source1
#  - source2
#patches:
#preamble: |-
# BuildRequires:  gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s,  *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL 
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

Reply via email to