Re: RE : cryptic error messages in modules

2004-08-06 Thread Christopher J. Bottaro
Jose Nyimi wrote: > I made a copy-paste of your above code, added the following to call f(): > > package main; > My::Class::f(); > > And got the error message below: > Global symbol "$s" requires explicit package name at try.pl line 31. > Execution of try.pl aborted due to compilation errors. >

RE : cryptic error messages in modules

2004-08-05 Thread Jose Nyimi
> -Message d'origine- > De : news [mailto:[EMAIL PROTECTED] De la part de Christopher J. Bottaro > Envoyé : jeudi 5 août 2004 19:39 > À : [EMAIL PROTECTED] > Objet : cryptic error messages in modules > > package My::Class; > use strict; > use warning

cryptic error messages in modules

2004-08-05 Thread Christopher J. Bottaro
package My::Class; use strict; use warnings; use Class::Struct; use IO::File; struct MyStruct => { f1 => '$', f2 => '$' }; sub new { my ($class, $ifname) = @_; my $s = {}; $class = ref($class) || $class; bless ($s, $class); $s->{FILE} = new