http://www.perlmonks.org?node_id=314561


in reply to Usage: init(class) @ GTK

In the CPAN docs it, the calls it init() without any arguments. Try replacing
Gtk2->init(\@ARGV);
with
Gtk2->init();
Update: when calling a PACKAGE->method(), the class is passed as the first argument automatically. So that is where Usage: init(class) comes in.

Example:
#!/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