Revision d2c9cb3b
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 |
|
|
42 | 44 |
sub new { |
43 | 45 |
$main::lxdebug->enter_sub(); |
44 | 46 |
|
45 | 47 |
my ($type, $menufile) = @_; |
46 | 48 |
|
49 |
return $instance if $instance; |
|
50 |
|
|
47 | 51 |
my $self = {}; |
48 | 52 |
my $inifile = Inifile->new($menufile); |
49 | 53 |
|
... | ... | |
55 | 59 |
|
56 | 60 |
$main::lxdebug->leave_sub(); |
57 | 61 |
|
58 |
return $self; |
|
62 |
return $instance = $self;
|
|
59 | 63 |
} |
60 | 64 |
|
61 | 65 |
sub menuitem_js { |
Auch abrufbar als: Unified diff
Menu Instance als Singleton cachen.