develooper Front page | perl.perl5.porters | Postings from March 2000

RE: Source filters

From:
Marquess,P,Paul,NEL38 R
Date:
March 24, 2000 11:37
Subject:
RE: Source filters
Message ID:
5104D4DBC598D211B5FE0000F8FE7EB2067FE5EC@mbtlipnt02.btlabs.bt.co.uk
From: Gurusamy Sarathy [mailto:gsar@ActiveState.com]
 
> On Fri, 24 Mar 2000 15:32:10 GMT, "Moore, Paul" wrote:
> >That's sort of what I was thinking of. But there will of necessity be a
> >default if the filter doesn't specify anything explicit. I would say that
> >should be textmode, (a) for backward compatibility, and (b) because I
would
> >expect many of the uses of filters (particularly by the non-experts who
> >wouldn't necessarily have found out about a binary input switch) would be
> >straight text-handling.
> 
> It would seem the default could be DWIM-med by Filter quite easily if
> the filter implementation doesn't specify it.

I'm a bit confused about what the problem is here folks and I don't have the
Perl source at hand to check anything out. I do have a win95 box with
ActivePerl 520 and a pre-built copy of the filters though.

This filter works fine with a CR/LF script on my win95 box. I didn't have to
get into removing "\r" at all.

package try;
 
use Filter::Util::Call ;
sub import { filter_add(bless []) }
 
sub filter
{
    my ($self) = @_ ;
    my ($status) ;
 
    if (($status = filter_read()) > 0) {
        s/ABC/DEF/g
    }
    $status ;
}
 
 
1 ;


It's been a hectic day, so forgive me if I've missed something very obvious.

Paul



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About