}
else{ # writer
$accessor .=
- 'if(@_ < 2){ Carp::confess("Not enough arguments for the writer of '.$name.'") }'.
+ 'if(@_ < 2){ Carp::confess("Not enough arguments for the writer of $name") }'.
'{' . "\n";
}
$accessor .= "}\n";
}
elsif($type eq 'ro') {
- $accessor .= 'Carp::confess("Cannot assign a value to a read-only accessor") if scalar(@_) >= 2;' . "\n";
+ $accessor .= 'Carp::confess("Cannot assign a value to a read-only accessor of $name") if scalar(@_) >= 2;' . "\n";
}
else{
$class->throw_error("Unknown accessor type '$type'");