Hi Brian,
What about adding another inline shortcut, 'DEBUG'? This is not an
interactive debugger, just a chance to tell ILSMs that they're being
debugged. For instance, I'd like to have Inline::CPP print out lots of
information if someone's trying to figure out why their class isn't getting
bound to Perl:
$ perl -MInline=info,force,noclean foo.pl
<-----------------------Information Section----------------------------->
Information about the processing of your Inline C++ code:
Your source code needs to be compiled. I'll use this build directory:
/home/nwatkiss/dev/cpan/Inline-CPP/_Inline/build/_01basic_t_5cd2
and I'll install the executable as:
/home/nwatkiss/dev/cpan/Inline-CPP/_Inline/lib/auto/_01basic_t_5cd2/_01basic_t_5cd2.so
The following C++ classes have been bound to Perl:
class Soldier {
Soldier::Soldier(char * name, char * rank, int serial);
char * Soldier::get_name();
char * Soldier::get_rank();
int Soldier::get_serial();
};
The following C++ functions have been bound to Perl:
Soldier::Soldier(char * name, char * rank, int serial);
char * Soldier::get_name();
char * Soldier::get_rank();
int Soldier::get_serial();
<-----------------------End of Information Section------------------------>
But it would be nice to also be able to say this:
$ perl -MInline=info,force,noclean,debug foo.pl
<---------DEBUGGING-------->
Inline::CPP::grammar: returned the grammar
Inline::CPP: created a new Parse::RecDescent parser
Inline::CPP: parsing code
parse: IDENTIFIER
parse: saw a class definition for 'Soldier'
....
parse: okay
Inline::CPP: generating bindings
Inline::CPP: fatal error in foo!
<---------END DEBUGGING-------->
What do you think? And for people on the list -- would you use this? How
well-used are the existing shortcuts?
Later,
Neil