ingydotnet / inline-c-pm

10 stars 19 forks source link

USING is not back compatible. #22

Closed ingydotnet closed 9 years ago

ingydotnet commented 10 years ago

Old usage:

use Inline C => using => 'ParseRecDescent';

New syntax:

use Inline C => using => 'Inline::C::Parser::RecDescent';

Or:

use Inline C => using => 'RecDescent';

We need to provide special support for the 2 old parsers to DTRT:

Maybe with tests :)

mohawk2 commented 10 years ago

Have a hash in Inline::C: my %OLDPARSER2NEW = qw(ParseRecDescent Inline::C::Parser::RecDescent ParseRegExp Inline::C::Parser::RegExp);

And the USING-handler does: $class = $OLDPARSER2NEW{$class} || $class;

Big question: USING is currently handled in Inline proper; could Inline::C::validate do the above mapping?

ingydotnet commented 9 years ago

I think this is handled now. Closing.