Revision 075f1eab
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
SL/Menu.pm | ||
---|---|---|
39 | 39 |
|
40 | 40 |
use strict; |
41 | 41 |
|
42 |
my $instance; |
|
43 |
|
|
44 | 42 |
sub new { |
45 | 43 |
$main::lxdebug->enter_sub(); |
46 | 44 |
|
47 | 45 |
my ($type, $menufile) = @_; |
48 | 46 |
|
49 |
if ($instance) { |
|
50 |
$::lxdebug->leave_sub; |
|
51 |
return $instance; |
|
52 |
} |
|
53 |
|
|
54 | 47 |
my $self = {}; |
55 | 48 |
my $inifile = Inifile->new($menufile); |
56 | 49 |
|
... | ... | |
62 | 55 |
|
63 | 56 |
$main::lxdebug->leave_sub(); |
64 | 57 |
|
65 |
return $instance = $self;
|
|
58 |
return $self; |
|
66 | 59 |
} |
67 | 60 |
|
68 | 61 |
sub menuitem_js { |
Auch abrufbar als: Unified diff
Revert "Menu Instance als Singleton cachen."
This reverts commit b76380d4aaab32fd83ba5cfc7e071455093192e1.
Conflicts: