r59928 - in /branches/upstream/libnagios-object-perl/current: Build.PL ChangeLog MANIFEST MANIFEST.SKIP META.yml README lib/Nagios/Object/Config.pm t/continuation_lines.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Wed Jun 30 05:44:20 UTC 2010


Author: carnil-guest
Date: Wed Jun 30 05:43:53 2010
New Revision: 59928

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=59928
Log:
[svn-upgrade] new version libnagios-object-perl (0.21.12)

Added:
    branches/upstream/libnagios-object-perl/current/MANIFEST.SKIP
    branches/upstream/libnagios-object-perl/current/t/continuation_lines.t
Modified:
    branches/upstream/libnagios-object-perl/current/Build.PL
    branches/upstream/libnagios-object-perl/current/ChangeLog
    branches/upstream/libnagios-object-perl/current/MANIFEST
    branches/upstream/libnagios-object-perl/current/META.yml
    branches/upstream/libnagios-object-perl/current/README
    branches/upstream/libnagios-object-perl/current/lib/Nagios/Object/Config.pm

Modified: branches/upstream/libnagios-object-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/Build.PL?rev=59928&op=diff
==============================================================================
--- branches/upstream/libnagios-object-perl/current/Build.PL (original)
+++ branches/upstream/libnagios-object-perl/current/Build.PL Wed Jun 30 05:43:53 2010
@@ -3,8 +3,17 @@
 use Module::Build;
 
 my $build = Module::Build->new(
+    meta_merge => {
+        resources => {
+            repository => 'http://github.com/duncs/perl-nagios-object',
+            bugtracker =>
+                'https://rt.cpan.org/Public/Dist/Display.html?Name=Nagios-Object',
+            homepage => 'http://github.com/duncs/perl-nagios-object',
+        },
+    },
+
     dist_name      => 'Nagios-Object',
-    dist_version   => "0.21.10",
+    dist_version   => "0.21.12",
     dist_author    => 'Duncan Ferguson <duncs at cpan.org>',
     dist_abstract  => 'Nagios::Object - Nagios object configuration parsing.',
     license        => 'gpl',

Modified: branches/upstream/libnagios-object-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/ChangeLog?rev=59928&op=diff
==============================================================================
--- branches/upstream/libnagios-object-perl/current/ChangeLog (original)
+++ branches/upstream/libnagios-object-perl/current/ChangeLog Wed Jun 30 05:43:53 2010
@@ -108,3 +108,5 @@
 0.21.9 - Fixed speedup patch using logic similar to Nagios' for parsing status.dat
        - Added more comprehensive test for parsing status file
 0.21.10 - Fixed test failure on Perl 5.11 (RT #54464)
+0.21.11 - Added repository, bugtracker and homepage resources
+0.21.12 - Fixed continuation line handling - Thanks to payerle (RT#58906)

Modified: branches/upstream/libnagios-object-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/MANIFEST?rev=59928&op=diff
==============================================================================
--- branches/upstream/libnagios-object-perl/current/MANIFEST (original)
+++ branches/upstream/libnagios-object-perl/current/MANIFEST Wed Jun 30 05:43:53 2010
@@ -11,6 +11,7 @@
 lib/Nagios/Object/Config.pm
 lib/Nagios/StatusLog.pm
 MANIFEST
+MANIFEST.SKIP
 META.yml
 README
 t/00object.t
@@ -27,6 +28,7 @@
 t/70status.t
 t/98nagios-sample-config.t
 t/99config-extend.t
+t/continuation_lines.t
 t/hostgroup_hostgroups.cfg
 t/hostgroup_hostgroups.t
 t/jfrancois.cfg

Added: branches/upstream/libnagios-object-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/MANIFEST.SKIP?rev=59928&op=file
==============================================================================
--- branches/upstream/libnagios-object-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libnagios-object-perl/current/MANIFEST.SKIP Wed Jun 30 05:43:53 2010
@@ -1,0 +1,8 @@
+^MYMETA.yml$
+^\.git\/
+^Nagios-Object-\d+.\d+.\d+.tar.gz$
+^blib\/
+^_build\/
+^\.gitignore$
+^Build$
+^MANIFEST\.bak$

Modified: branches/upstream/libnagios-object-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/META.yml?rev=59928&op=diff
==============================================================================
--- branches/upstream/libnagios-object-perl/current/META.yml (original)
+++ branches/upstream/libnagios-object-perl/current/META.yml Wed Jun 30 05:43:53 2010
@@ -1,14 +1,7 @@
 ---
-name: Nagios-Object
-version: 0.21.10
+abstract: 'Nagios::Object - Nagios object configuration parsing.'
 author:
   - 'Duncan Ferguson <duncs at cpan.org>'
-abstract: 'Nagios::Object - Nagios object configuration parsing.'
-license: gpl
-resources:
-  license: http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
-requires:
-  perl: 5.6.1
 build_requires:
   Data::Dumper: 0.01
   Module::Build: 0.26
@@ -16,6 +9,14 @@
   Test::Exception: 0.01
   Test::More: 0.01
   Test::NoWarnings: 0.08
+configure_requires:
+  Module::Build: 0.36
+generated_by: 'Module::Build version 0.3603'
+license: gpl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: Nagios-Object
 provides:
   Nagios::Config:
     file: lib/Nagios/Config.pm
@@ -40,7 +41,7 @@
     version: 40
   Nagios::Object::Config:
     file: lib/Nagios/Object/Config.pm
-    version: 36
+    version: 37
   Nagios::Program::Status:
     file: lib/Nagios/StatusLog.pm
     version: 0.1
@@ -56,7 +57,11 @@
   Nagios::StatusLog:
     file: lib/Nagios/StatusLog.pm
     version: 41
-generated_by: Module::Build version 0.33
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+requires:
+  perl: v5.6.1
+resources:
+  bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Nagios-Object
+  homepage: http://github.com/duncs/perl-nagios-object
+  license: http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
+  repository: http://github.com/duncs/perl-nagios-object
+version: v0.21.12

Modified: branches/upstream/libnagios-object-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/README?rev=59928&op=diff
==============================================================================
--- branches/upstream/libnagios-object-perl/current/README (original)
+++ branches/upstream/libnagios-object-perl/current/README Wed Jun 30 05:43:53 2010
@@ -22,7 +22,7 @@
 Bug Reports:
 
   Please report all bugs via the CPAN bugs RT system:
-    http://rt.cpan.org/NoAuth/Bugs.html?Dist=Nagios-Object
+    https://rt.cpan.org/Public/Dist/Display.html?Name=Nagios-Object
   In any bug report, include a short description of your problem and a copy 
 of the output from "Build test."  The more diagnostic information you send, 
 the better.

Modified: branches/upstream/libnagios-object-perl/current/lib/Nagios/Object/Config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/lib/Nagios/Object/Config.pm?rev=59928&op=diff
==============================================================================
--- branches/upstream/libnagios-object-perl/current/lib/Nagios/Object/Config.pm (original)
+++ branches/upstream/libnagios-object-perl/current/lib/Nagios/Object/Config.pm Wed Jun 30 05:43:53 2010
@@ -27,7 +27,7 @@
 
 # NOTE: due to CPAN version checks this cannot currently be changed to a
 # standard version string, i.e. '0.21'
-our $VERSION     = '36';
+our $VERSION     = '37';
 our $fast_mode   = undef;
 our $strict_mode = undef;
 
@@ -178,15 +178,24 @@
     my ( $append, $type, $current, $in_definition ) = ( '', '', {}, undef );
     while ( my $line = strippedline($fh) ) {
 
-        # skip empty lines
-        next if ( $line eq ' ' );
-
         # append saved text to the current line
         if ($append) {
+            $line = '' unless $line;
             if ( $append !~ / $/ && $line !~ /^ / ) { $append .= ' ' }
             $line   = $append . $line;
             $append = undef;
         }
+
+	if ( $line && $line =~ /\\$/ )
+	{	#Continued line (ends in a '\')
+		#Remove \, append to $append, and let next iteration handle it
+		$line =~ s/\s*\\$//;
+		$append = $line;
+		next;
+	}
+
+        # skip empty lines (don't do earlier because may get stuff prepended)
+        next if ( $line eq ' ' );
 
         if ( $line =~ /include_file\s*=\s*([\w\-\/\\\:\.]+)/ ) {
             my $incfile = $1;

Added: branches/upstream/libnagios-object-perl/current/t/continuation_lines.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-object-perl/current/t/continuation_lines.t?rev=59928&op=file
==============================================================================
--- branches/upstream/libnagios-object-perl/current/t/continuation_lines.t (added)
+++ branches/upstream/libnagios-object-perl/current/t/continuation_lines.t Wed Jun 30 05:43:53 2010
@@ -1,0 +1,44 @@
+#!/usr/local/bin/perl
+
+use strict;
+use warnings;
+use Test::More tests => 9;
+use Test::NoWarnings;
+use File::Temp;
+use lib qw( ../lib ./lib );
+
+use_ok('Nagios::Object::Config');
+
+my $cfg_file = File::Temp->new( UNLINK => 0, );
+
+# NOTE: there are spaces and tabs in the following section
+print $cfg_file <<'EOF';
+define command {
+    command_name    long-command
+    command_line    /usr/bin/longcommand \
+        -options=many \
+		-uses=continuation-lines
+}
+EOF
+
+$cfg_file->close;
+
+my $parser
+    = Nagios::Object::Config->new( Version => 2, regexp_matching => 1 );
+
+isa_ok( $parser, 'Nagios::Object::Config' );
+
+ok( $parser->parse( $cfg_file->filename ), 'parse ran OK' );
+
+my $cmds = $parser->list_commands;
+ok( $cmds, 'non-null list_commands' );
+is( ref($cmds),         'ARRAY', 'Got expected arrayref' );
+is( scalar( @{$cmds} ), 1,       'Got correct array count' );
+
+is( $cmds->[0]->command_name, 'long-command', 'command_name set correctly' );
+is( $cmds->[0]->command_line,
+    '/usr/bin/longcommand -options=many -uses=continuation-lines',
+    'command_line set correctly'
+);
+
+unlink( $cfg_file->filename );




More information about the Pkg-perl-cvs-commits mailing list