From e8a9d184452df006258d1800df59d0a8cffb4f09 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Wed, 25 Jul 2012 20:41:33 -0400 Subject: [PATCH] Fix to return cached data for table methods (funcs) if available and not a partial request. Partial argument could be undef, but existed in methods supporting partial fetches. Changed check to see if there is a value in the partial argument rather than existence. --- ChangeLog | 3 ++- Info.pm | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92da56c5..caac5b7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,7 +14,8 @@ version 2.09 [BUG FIXES] - + * Fixed logic to return cached data for table methods when available and + not a partial fetch version 2.08 (2012-07-15) diff --git a/Info.pm b/Info.pm index bfdba2ae..d8b7e7de 100644 --- a/Info.pm +++ b/Info.pm @@ -23,7 +23,7 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP $NOSUCH $BIGINT $REPEATERS/; -$VERSION = '2.08'; +$VERSION = '2.09-cvs'; =head1 NAME @@ -3831,11 +3831,11 @@ sub AUTOLOAD { # Load data if it both not cached and we are not requesting partial info. if ( defined $funcs{$attr} ) { return $self->_load_attr( $attr, $funcs{$attr}, @_ ) - unless ( defined $self->{"_${attr}"} and !scalar(@_) ); + unless ( defined $self->{"_${attr}"} and !defined $_[0] ); } if ($table_leaf) { return $self->_load_attr( $attr, $attr, @_ ) - unless ( defined $self->{"_${attr}"} and !scalar(@_) ); + unless ( defined $self->{"_${attr}"} and !defined $_[0] ); } return $self->_show_attr($attr);