Subject: | No error if method name matches field hash name |
Hi
I'd like an error to be produced when a field hash name matches a method
name.
This is perhaps most likely when inheriting from another class.
Sample code (X.pm):
package X;
use Hash::FieldHash qw(:all);
fieldhash my %marine => 'marine';
# -----------------------------------------------
sub new
{
my($class) = @_;
my($self) = bless {}, $class;
$self -> marine;
return $self;
} # End of new.
# -----------------------------------------------
sub marine
{
print "Invisible msg. \n";
}
# -----------------------------------------------
1;
x.pl:
#!/usr/bin/perl
use lib '.';
use strict;
use warnings;
use X;
# ----
my($x) = X -> new();
$x -> marine(99);
print 'marine: ', $x -> marine, "\n";
------------
$many x $thanx.
Cheers