Skip Menu |

This queue is for tickets about the RRDTool-OO CPAN distribution.

Report information
The Basics
Id: 54544
Status: resolved
Priority: 0/
Queue: RRDTool-OO

People
Owner: Nobody in particular
Requestors: cpan [...] tomsdiner.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.28
Fixed in: (no value)



Subject: Allow the usage of updatev command
Hi, a week ago I did send this patch via mail to you -- just in case you didn't receive it because of spam-filters or some other reason I attach it here as a wishlist item. If you ignored my mail on purpose (because the patch isn't up to some standard), please excuse my pestering you again and feel free to ignore/wontfix this item, otherwise I hope I reach you via this route. I want to be able to use updatev instead of update, I implemented it according to your implementation of graphv - the patched version is in use here and works (up to now) as expected. Kind regards, Tom Regner
Subject: OO.pm-updatev.patch
*** OO.pm.bak 2010-02-05 09:52:35.000000000 +0100 --- OO.pm 2010-02-05 10:40:21.000000000 +0100 *************** *** 7,13 **** use RRDs; use Log::Log4perl qw(:easy); ! our $VERSION = '0.28'; # Define the mandatory and optional parameters for every method. our $OPTIONS = { --- 7,13 ---- use RRDs; use Log::Log4perl qw(:easy); ! our $VERSION = '0.29'; # Define the mandatory and optional parameters for every method. our $OPTIONS = { *************** *** 142,147 **** --- 142,148 ---- create => \&RRDs::create, fetch => \&RRDs::fetch, update => \&RRDs::update, + updatev => \&RRDs::updatev, graph => \&RRDs::graph, graphv => \&RRDs::graphv, info => \&RRDs::info, *************** *** 480,487 **** $update_string .= $options_hash{value}; } ! $self->RRDs_execute("update", $self->{file}, ! @update_options, $update_string); } ################################################# --- 481,505 ---- $update_string .= $options_hash{value}; } ! 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,1346 **** --- 1359,1370 ---- 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
Sorry for the delay, patch applied: http://github.com/mschilli/rrdtool-oo-perl/commit/5b99cfa64a7c2fe10685c2796e83d2835d1f8e89 Thanks for your contribution.