projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14e0c52
)
Change $_category_table to be a hash which maps packages to category tables. A bug...
author
Joshua Goodman
<jgoodman1990@gmail.com>
Fri, 16 Jan 2015 00:25:37 +0000
(
00:25
+0000)
committer
Joshua Goodman
<jgoodman1990@gmail.com>
Fri, 16 Jan 2015 00:25:37 +0000
(
00:25
+0000)
FS/FS/class_Common.pm
patch
|
blob
|
history
diff --git
a/FS/FS/class_Common.pm
b/FS/FS/class_Common.pm
index
455cb9f
..
01048ec
100644
(file)
--- a/
FS/FS/class_Common.pm
+++ b/
FS/FS/class_Common.pm
@@
-122,14
+122,15
@@
sub _target_table {
sub _target_column { 'classnum'; }
sub _target_column { 'classnum'; }
-use vars qw(
$
_category_table );
+use vars qw(
%
_category_table );
sub _category_table {
sub _category_table {
- return $_category_table if $_category_table;
my $self = shift;
my $self = shift;
- $_category_table = $self->table;
- $_category_table =~ s/class/category/ # s/_class$/_category/
- or die "can't determine an automatic category table for $_category_table";
- $_category_table;
+ return $_category_table{ ref $self } ||= do {
+ my $category_table = $self->table;
+ $category_table =~ s/class/category/ # s/_class$/_category/
+ or die "can't determine an automatic category table for $category_table";
+ $category_table;
+ }
}
=head1 BUGS
}
=head1 BUGS