in reply to Usage: init(class) @ GTK

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

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

Replies are listed 'Best First'.
Re: Re: Usage: init(class) @ GTK
by traveler (Parson) on Dec 13, 2003 at 22:15 UTC
    tcf22 is correct. Where is the example you quoted so I can report it to the Gtk2 team if is in the Gtk2 stuff? You can also start Gtk2 with use Gtk2 -init; and then init is called for you.