Dan writes:
>*) Filehandles get treated like arrays. Filters (which will be plain
>coderefs) can be push/pop/shift/unshift/spliced onto them.

By coderef I'm assuming you mean something like this Perl pseudo code...

sub filter_dos_newlines {
     my $pmc = shift;
     my $op = shift;

     if( $op >= 0 && $op < MAX_IO_FUN ) {
          &{$myfilter_vtable[$op]}( \$pmc->data );
     }

     return $pmc;
}

>*) Filters get passed a PMC and an int. The int is a function number
>(1=read, 2=write, 3=seek, 4=tell, 5=control, or something like that) and
>the PMC represents the source data. They return a mutated PMC that's
passed
>on to the next filter.

Sounds like layers except with layers layer[i] is chained with layer[i+1]
and calls it directly.

>I'd like the whole filter chain to run in its own interpreter, but that
>means the filters can't ultimately return objects and things like that,
>which is sort of bad.

I'll let you think on that.

-Melvin Smith

IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984

Reply via email to