r53183 - in /branches/upstream/librrdtool-oo-perl/current: Changes META.yml Makefile.PL README lib/RRDTool/OO.pm t/005Graph.t t/007Dump.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Mon Feb 22 09:19:29 UTC 2010


Author: carnil-guest
Date: Mon Feb 22 09:19:23 2010
New Revision: 53183

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53183
Log:
[svn-upgrade] Integrating new upstream version, librrdtool-oo-perl (0.30)

Modified:
    branches/upstream/librrdtool-oo-perl/current/Changes
    branches/upstream/librrdtool-oo-perl/current/META.yml
    branches/upstream/librrdtool-oo-perl/current/Makefile.PL
    branches/upstream/librrdtool-oo-perl/current/README
    branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm
    branches/upstream/librrdtool-oo-perl/current/t/005Graph.t
    branches/upstream/librrdtool-oo-perl/current/t/007Dump.t

Modified: branches/upstream/librrdtool-oo-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/Changes?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/Changes (original)
+++ branches/upstream/librrdtool-oo-perl/current/Changes Mon Feb 22 09:19:23 2010
@@ -1,3 +1,12 @@
+0.30  (02/21/2010)
+    (ms) [RT 53961] Worked around rrdtool-1.3.5 inaccuracy problem by
+         skipping certain tests for rrdtool <= 1.4.
+
+0.29  (02/20/2010)
+    (ms) Added github repository link to Makefile.PL
+    (ms) Fixed documentation for fetch_next().
+    (ms) [RT 54544] Tom Regner added support for updatev().
+
 0.28 (11/05/2009)
     (ms) Applied patch by Lyle Brooks, adding optional step, start, and
          end parameters to "draw".

Modified: branches/upstream/librrdtool-oo-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/META.yml?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/META.yml (original)
+++ branches/upstream/librrdtool-oo-perl/current/META.yml Mon Feb 22 09:19:23 2010
@@ -1,12 +1,25 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         RRDTool-OO
-version:      0.28
-version_from: lib/RRDTool/OO.pm
-installdirs:  site
+--- #YAML:1.0
+name:               RRDTool-OO
+version:            0.30
+abstract:           Object-oriented interface to RRDTool
+author:
+    - Mike Schilli <m at perlmeister.com>
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-    Log::Log4perl:                 0.40
-    RRDs:                          0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30_01
+    Log::Log4perl:  0.40
+    RRDs:           0
+resources:
+    repository:  http://github.com/mschilli/rrdtool-oo-perl
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.50
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/librrdtool-oo-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/Makefile.PL?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/Makefile.PL (original)
+++ branches/upstream/librrdtool-oo-perl/current/Makefile.PL Mon Feb 22 09:19:23 2010
@@ -1,6 +1,14 @@
 use 5.006;
 use ExtUtils::MakeMaker;
 use File::Basename;
+
+my $meta_merge = {
+    META_MERGE => {
+        resources => {
+            repository  => 'http://github.com/mschilli/rrdtool-oo-perl',
+        },
+    }
+};
 
 # Check if RRDs is installed
 
@@ -50,6 +58,7 @@
                          Log::Log4perl => '0.40',
                          RRDs          => 0,
                          }, # e.g., Module::Name => 1.1
+    $ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (),
     ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
       (ABSTRACT_FROM  => 'lib/RRDTool/OO.pm', # retrieve abstract from module
        AUTHOR         => 'Mike Schilli <m at perlmeister.com>') : ()),

Modified: branches/upstream/librrdtool-oo-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/README?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/README (original)
+++ branches/upstream/librrdtool-oo-perl/current/README Mon Feb 22 09:19:23 2010
@@ -1,5 +1,5 @@
 ######################################################################
-    RRDTool::OO 0.28
+    RRDTool::OO 0.30
 ######################################################################
 
 NAME
@@ -181,6 +181,11 @@
         "RRDTool::OO" will transform this automagically into "RRDTool's"
         *template* syntax.
 
+    *$rrd->updatev( ... )*
+        This is identical to "update", but uses rrdtool's updatev function
+        internally. The only difference is when using the "print_results"
+        method described below, which then contains additional information.
+
     *$rrd->fetch_start( ... )*
         Initializes the iterator to fetch data from the RRD. This works
         nicely without any parameters if your archives are using a single
@@ -229,6 +234,15 @@
         call to "$rrd->fetch_start()". Returns the time of the archive point
         along with all values as a list.
 
+        Note that there might be more than one value coming back from
+        "fetch_next" if the RRA defines more than one datasource):
+
+            I<($time, @values_of_all_ds) = $rrd-E<gt>fetch_next()>
+
+        It is not possible to fetch only a specific datasource, as rrdtool
+        doesn't provide this.
+
+    *($time, $value, ...) = $rrd->fetch_next()*
     *$rrd->graph( ... )*
         If there's only one data source in the RRD, drawing a nice graph in
         an image file on disk is as easy as

Modified: branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm (original)
+++ branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm Mon Feb 22 09:19:23 2010
@@ -7,7 +7,7 @@
 use RRDs;
 use Log::Log4perl qw(:easy);
 
-our $VERSION = '0.28';
+our $VERSION = '0.30';
 
    # Define the mandatory and optional parameters for every method.
 our $OPTIONS = {
@@ -142,6 +142,7 @@
     create    => \&RRDs::create,
     fetch     => \&RRDs::fetch,
     update    => \&RRDs::update,
+    updatev   => \&RRDs::updatev,
     graph     => \&RRDs::graph,
     graphv    => \&RRDs::graphv,
     info      => \&RRDs::info,
@@ -480,8 +481,25 @@
         $update_string .= $options_hash{value};
     }
 
-    $self->RRDs_execute("update", $self->{file}, 
-                        @update_options, $update_string);
+    my $caller = (caller(1))[3] ? (caller(1))[3] : '';
+    my $updatecmd = $caller eq __PACKAGE__."::updatev" ? 'updatev' : 'update';
+    my ($print_results) = 
+        $self->RRDs_execute($updatecmd, $self->{file},
+                            @update_options, $update_string);
+
+    if(!defined $print_results) {
+        return undef;
+    }
+
+    $self->print_results( $print_results );
+
+    return 1;
+}
+
+#################################################
+sub updatev {
+#################################################
+    &update (@_);
 }
 
 #################################################
@@ -1341,6 +1359,12 @@
 C<RRDTool::OO> will transform this automagically
 into C<RRDTool's> I<template> syntax.
 
+=item I<$rrd-E<gt>updatev( ... )>
+
+This is identical to C<update>, but uses rrdtool's updatev function internally.
+The only difference is when using the C<print_results> method described 
+below, which then contains additional information.
+
 =item I<$rrd-E<gt>fetch_start( ... )>
 
 Initializes the iterator to fetch data from the RRD. This works nicely without
@@ -1394,6 +1418,16 @@
 Gets the next row from the RRD iterator, initialized by a previous call
 to C<$rrd-E<gt>fetch_start()>. Returns the time of the archive point
 along with all values as a list.
+
+Note that there might be more than one value coming back from C<fetch_next>
+if the RRA defines more than one datasource):
+
+    I<($time, @values_of_all_ds) = $rrd-E<gt>fetch_next()>
+
+It is not possible to fetch only a specific datasource, as rrdtool 
+doesn't provide this.
+
+=item I<($time, $value, ...) = $rrd-E<gt>fetch_next()>
 
 =item I<$rrd-E<gt>graph( ... )>
 

Modified: branches/upstream/librrdtool-oo-perl/current/t/005Graph.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/t/005Graph.t?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/t/005Graph.t (original)
+++ branches/upstream/librrdtool-oo-perl/current/t/005Graph.t Mon Feb 22 09:19:23 2010
@@ -602,22 +602,28 @@
 			@prgraph,
     );
 
-is($rrd->print_results()->[0], "Result = 5.50", "print result");
+
+SKIP: {
+    skip "Skipping potentially buggy RRDs < 1.4 for print/format", 1 if 
+        $RRDs::VERSION < 1.4;
+    is($rrd->print_results()->[0], "Result = 6.00", "print result");
+}
 
 ######################################################################
 # Draw simple graphv
 ######################################################################
 SKIP: {
-	eval "use RRDs 1.3";
-	skip "RRDs is too old: need 1.3 for graphv", 2 if $@;
+    eval "use RRDs 1.3";
+    skip "RRDs is too old: need 1.3 for graphv", 2 if $@;
+
         # Simple line graph
-    $rrd->graphv(
-			@prgraph,
-    );
-
-	ok(-f "mygraph.png", "Image exists");
-	unlink "mygraph.png";
-	is($rrd->print_results()->{'print[0]'}, "Result = 5.50", "print result");
+    $rrd->graphv( @prgraph );
+
+    ok(-f "mygraph.png", "Image exists");
+    unlink "mygraph.png";
+    skip "Skipping potentially buggy RRDs < 1.4 for print/format", 1 if 
+       $RRDs::VERSION < 1.4;
+    is($rrd->print_results()->{'print[0]'}, "Result = 6.00", "print result");
 }
 
 unlink("foo");

Modified: branches/upstream/librrdtool-oo-perl/current/t/007Dump.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/t/007Dump.t?rev=53183&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/t/007Dump.t (original)
+++ branches/upstream/librrdtool-oo-perl/current/t/007Dump.t Mon Feb 22 09:19:23 2010
@@ -65,7 +65,7 @@
 # Restore it.
 #####################################################
 $rrd->restore("out");
-is(-s "foo", $size, "RRD same size");
+ok(-f "foo", "RRD resurrected");
 
 END { unlink "foo"; 
       unlink "out";




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