NOTE: Forwarded from offline thread.
On 07/10/02 09:52 -0400, Mitchell N Charity wrote:
> +1 Good idea. I think this is coming together. Can you think of a better
> keyword than OVERRIDES or VARIANTS?
>
> How about something which captures policy and user intent ("this is
> how I would like my code generated") rather than implementation.
>
> (If a default changes, some OVERRIDE might then not be. ;)
>
> USING? I'd be tempted to say WITH if it wasn't alread taken.
>
> use Inline C => DATA =>
> USING => [ParserRegexp, GlueSwig];
>
> Eh. ...?
>
>
> Hmm. Say one of the variants is a new cache. Do you then need lots
> of Inline::<Language>::NewCache's, one for each language which caches
> something?
How about:
if ($using[$i] =~ /::/) {
eval "use $using[$i]";
}
else {
eval "use Inline::${language}::$using[$i]";
}
then:
use Inline C => DATA =>
USING => [qw(ParserRegexp Inline::NewCache)];
Cheers, Brian