withGtk2->init(\@ARGV);
Update: when calling a PACKAGE->method(), the class is passed as the first argument automatically. So that is where Usage: init(class) comes in.Gtk2->init();
#!/usr/bin/perl use strict; use warnings; Tom->init; package Tom; sub init(){ print "Calling init\n"; print "$_\n" for(@_); } __OUTPUT__ Calling init Tom
- Tom
In reply to Re: Usage: init(class) @ GTK
by tcf22
in thread Usage: init(class) @ GTK
by eoin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |