if ( $options{fcc_options} ) {
warn " updating fcc options " if $DEBUG;
- $self->process_fcc_options( $options{fcc_options} );
+ $self->set_fcc_options( $options{fcc_options} );
}
warn " committing transaction" if $DEBUG and $oldAutoCommit;
if ( $options->{fcc_options} ) {
warn " updating fcc options " if $DEBUG;
- $new->process_fcc_options( $options->{fcc_options} );
+ $new->set_fcc_options( $options->{fcc_options} );
}
warn " committing transaction" if $DEBUG and $oldAutoCommit;
join("\n", @error);
}
-=item process_fcc_options HASHREF
+=item set_fcc_options HASHREF
Sets the FCC options on this package definition to the values specified
in HASHREF.
=cut
-sub process_fcc_options {
+sub set_fcc_options {
my $self = shift;
my $pkgpart = $self->pkgpart;
my $options;
sub option {
my( $self, $opt, $ornull ) = @_;
+
+ #cache: was pulled up in the original part_pkg query
+ if ( $opt =~ /^(setup|recur)_fee$/ && defined($self->hashref->{"_$opt"}) ) {
+ return $self->hashref->{"_$opt"};
+ }
+
cluck "$self -> option: searching for $opt"
if $DEBUG;
my $part_pkg_option =
optionname => $opt,
} );
return $part_pkg_option->optionvalue if $part_pkg_option;
+
my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
split("\n", $self->get('plandata') );
return $plandata{$opt} if exists $plandata{$opt};
cluck "WARNING: (pkgpart ". $self->pkgpart. ") Package def option $opt ".
"not found in options or plandata!\n"
unless $ornull;
+
'';
}