Hello all,

please consider the following code:
###################################
package main;
my $x= main::foo->new();
$x->bar();
$x->barx();

package foo;

sub new {
my $this = shift;
my $class = ref($this) || $this;
my $self={};
bless ($self, $class);
return $self;
}

sub bar
{
my $self = shift;
print "foo\n";
}
#################################

now, executing this code with "perl -cw script.pl" will not produce any
errors since the call for the reference of "barx" will only
be evaluated during runtime.
is there a way to detect such errors in compile time?

Hag Sameach,
Ronen
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to