]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Helper/DisplayableNamePreferences.pm
Merge branch 'master' of http://wagnertech.de/git/mfinanz
[mfinanz.git] / SL / DB / Helper / DisplayableNamePreferences.pm
index 5080ea245ff035de752b81d67b6ef4f99376b993..01982816c16cb0fd180549160bf289788c5660b3 100644 (file)
@@ -21,9 +21,6 @@ sub import {
   $params{title} && $params{options}  or croak 'need params title and options';
 
   $prefs_specs{$importing} = \%params;
-  $prefs{$importing}       = SL::Helper::UserPreferences::DisplayableName->new(
-    module => $importing
-  );
 
   # Don't 'goto' to Exporters import, it would try to parse @params
   __PACKAGE__->export_to_level(1, $class, @EXPORT);
@@ -50,7 +47,7 @@ sub displayable_name_prefs {
   my $class_or_self = shift;
   my $class         = ref($class_or_self) || $class_or_self;
 
-  return $prefs{$class};
+  return SL::Helper::UserPreferences::DisplayableName->new(module => $class);
 }
 
 sub displayable_name_specs {
@@ -91,15 +88,15 @@ names configured via user preferences
   # Controller configuring a displayable name
   # can get specs to display title and options
   # and the user prefs to read and set them
-  my specs => SL::DB::SomeObject->displayable_name_specs;
-  my prefs => SL::DB::SomeObject->displayable_name_prefs;
+  my specs = SL::DB::SomeObject->displayable_name_specs;
+  my prefs = SL::DB::SomeObject->displayable_name_prefs;
 
 
 This mixin provides a method C<displayable_name> for the calling module
-which returns the a string depending on the settings of the
-C<UserPreferences> (see also L<SL::Helper::UserPrefernces::DisplayableName>.
-The value in the user preferences is scanned for a pattern like E<lt>%name%E<gt>, which
-will be replaced by the value of C<$object-E<gt>name>.
+which returns a string depending on the settings of the
+C<UserPreferences> (see also L<SL::Helper::UserPrefernces::DisplayableName>).
+The value in the user preferences is scanned for a pattern like
+E<lt>%name%E<gt>, which will be replaced by the value of C<$object-E<gt>name>.
 
 =head1 CONFIGURATION
 
@@ -134,7 +131,7 @@ user.
 
 =item C<displayable_name_prefs>
 
-This returns an instance of the L<SL::Helper::UserPrefernces::DisplayableName>
+This returns an instance of the L<SL::Helper::UserPreferences::DisplayableName>
 (see there) for the calling class. This can be used to read and set the
 preferences.