sub new {
my ($class, $name, %options) = @_;
- $class->_process_options($name, \%options) unless $options{__hack_no_process_options}; # used from clone()... YECHKKK FIXME ICKY YUCK GROSS
+ return $class->SUPER::new($name, $class->BUILDARGS($name, %options));
+}
+
+sub BUILDARGS {
+ my ( $class, $name, %options ) = @_;
+
+ $class->_process_options($name, \%options)
+ unless $options{__hack_no_process_options}; # used from clone()... YECHKKK FIXME ICKY YUCK GROSS
delete $options{__hack_no_process_options};
Carp::cluck "Found unknown argument(s) passed to '$name' attribute constructor in '$class': @bad";
}
- return $class->SUPER::new($name, %options);
+ return %options;
}
sub interpolate_class_and_new {