package FS::option_Common;
use strict;
-use vars qw( @ISA $DEBUG );
+use base qw( FS::Record );
+use vars qw( $DEBUG );
use Scalar::Util qw( blessed );
use FS::Record qw( qsearch qsearchs dbh );
-@ISA = qw( FS::Record );
-
$DEBUG = 0;
=head1 NAME
$obj ? $obj->$valuecol() : '';
}
+=item option_cacheable OPTIONNAME
+
+Same as the option method, but may cache and return a cached value.
+Good for use within loops; otherwise, probably avoid.
+
+=cut
+
+sub option_cacheable {
+ my( $self, $name ) = @_;
+ return $self->{option_cache}{$name} if exists $self->{option_cache}{$name};
+ $self->{option_cache}{$name} = $self->option($name,1);
+}
+
sub option_table {
my $self = shift;