ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/Switcher.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/Switcher.pm (file contents):
Revision 1.3 by williamc, Wed Sep 29 11:52:28 1999 UTC vs.
Revision 1.5 by williamc, Wed Sep 29 15:25:32 1999 UTC

# Line 26 | Line 26 | sub new {
26          my $objectname=shift;
27          my $groupchecker=shift;
28  
29 <        my $self = {};
29 >        $self = {};
30          $self->{allw}=$objectname;
31          bless $self, $class;
32          $self->_initialise($file);
# Line 65 | Line 65 | sub usegroupchecker {
65   sub parse {
66          my $self=shift;
67          my $char;
68 +        my $buf;
69          $self->{linecount}=0;
70          $self->_resetvars();
71  
72          # Open the file
73          use FileHandle;
74 <        my $filehandle=FileHandle->new();
75 <        open( $filehandle , "$self->{filename}" )
74 >        my $filehandle;
75 >        $filehandle=FileHandle->new();
76 >        $filehandle->open("<$self->{filename}")
77             or return 1;
78 < #               or carp "Switcher: Cannot open $self->{filename} $! \n";
78 >        # The buffering seems all messed up - best not to use it
79 >        $filehandle->setvbuf($buf, _IONBF, 3000);
80  
78        print "Starting Parse $self->{filename}\n";
81          # Start file processing
82 <        while ( <$filehandle> ) {
82 >        while ( ($_=<$filehandle>) ) {
83           $self->{linecount}++;
84           $self->{currentline}=$_;
85           $self->{stringpos}=0;
# Line 85 | Line 87 | sub parse {
87             $self->_checkchar($char);
88           } # end char while
89          } # End String while loop
90 <        close $filehandle;
89 <        print "Exiting Parse $self->{filename}\n";
90 >        undef $filehandle;
91   }
92  
93   sub checkparam($name, $key) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines