From: Marcel Grunauer [mailto:[EMAIL PROTECTED]]
> 
> > package MyClass;
> > use Inline::Attributes;
> >
> > sub C :INLINE (
> >   void hello()
> >   {
> >     printf("Hello\n");
> >   }
> > );
> >
> > &hello;
> >
> > 1;
> > __END__
> 
> took me a while to understand what you're doing here, but that's
> clever - the whole function as the attribute data.
> 
> Still, I don't see the advantage of that over __C__ sections or
> just saying  'use Inline C => ...' as you still have to define
> the whole C function within another construct; the idea was to
> have the C function look like a perl sub:

No... no real advantage, just gives you easy access to a <<'EOF'.

In a yet to be released version of Attribute::Handlers Damian has added
support for phasic handlers. With which you could have each:

sub C:INLINE ( ... );

Stuff the ... into a big 'ol string during the CHECK block that would be
inlined at INIT...

Reply via email to