Skip to content

Commit

Permalink
Work around a NQP limitation caught by jnthn++
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Apr 2, 2010
1 parent 4efce50 commit 98818c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/tk.pl
Expand Up @@ -10,11 +10,12 @@

my $mw := %exp<sub><&MainWindow>().new;

$mw.Label(-text => 'Hello, world!').pack;
$mw.Label('-text', 'Hello, world!').pack;

# NQP doesn't support named args starting with a dash
$mw.Button(
-text => 'Quit',
-command => sub (*@_) { exit },
'-text', 'Quit',
'-command', sub (*@_) { exit },
).pack;


0 comments on commit 98818c9

Please sign in to comment.