package AI::Neural; use AI::_Neural; use attributes; #Hook from __new to new sub new { my $string; open "SUB_TYPE", ">>AI\/data\/new.type" or die "Could not open file for write : $!\n"; open "SUB_DATA", ">>AI\/data\/new.data" or die "Could not open file for write : $!\n"; my $args; foreach my $arg ( @_ ) { $args .= $arg . ","; } chop $args; $args .= "\n"; print SUB_DATA $args; close (SUB_DATA); foreach $attr ( @_ ) { if ( ref($attr) ) { $string .= "REF:" . ref($attr) . ","; } else { $string .= attributes::reftype(\$attr) . ","; } } chop $string; $string .= "\n"; print SUB_TYPE $string; close (SUB_TYPE); return AI::_Neural::__new(@_); } ..... .....