cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cons 2.1.2 issues


From: Brad Garcia
Subject: Re: cons 2.1.2 issues
Date: Thu, 2 Nov 2000 16:42:02 -0500 (EST)

On Thu, 2 Nov 2000, Zachary Deretsky wrote:

> 4. It would be nice if QuickScan interface could be changed to just filename
> as a parameter. There are at least 2 problems now: the scanner is called too
> many times and the filename of the scanned file is not available
> for debugging.

When you say "the scanner is called too many times", I am assuming that
you are referring to the fact that it is called once per line for every
file.

Notice that within the scanner function itself, you can read multiple
lines.  You could read the entire file, in which case the scanner would
be called only once per file.

>From the documentation:

       The
       subroutine is called once for each line in the file, with
       $_ set to the current line. If the subroutine needs to
       look at additional lines, or, for that matter, the entire
       file, then it may read them itself, from the filehandle
       SCAN. It may also terminate the loop, if it knows that no
       further include information is available, by closing the
       filehandle.

So the current implementation gives you the flexibility of coding it
either way.

Brad Garcia




reply via email to

[Prev in Thread] Current Thread [Next in Thread]