![]() |
![]() |
9 Einträge, 1 Seite |
1 2
$config->setConfig('CUI', new Curses::UI (-clear_on_exit => 1, -debug => $debug)); $config->getConfig('CUI')->set_binding(sub{exit}, "\cQ");
my $ui = new UI(\$config);
1 2 3 4 5 6 7
sub new { my ($self, $config) = @_; bless $config, UI_Config; my $main = $config->getConfig('CUI')->add( undef, 'Window', -title => 'Main Window', );
my $ui = new UI($config); #nicht als referenz übergeben
1 2 3
my $var = "Hallo"; # Original my $ref1 = \$var; # $ref1 ist nun eine Referenz auf $var my $ref2 = $ref1; # $ref2 ist nun eine Referenz auf $var
1 2 3 4 5 6
sub new { my ($class, %args) = @_; my $hash_href = { %args }; return bless $hash_href, $class; }
sub new { bless { @_[1..$#_] }, $_[0] }
![]() |
![]() |
9 Einträge, 1 Seite |