Changeset 8555
- Timestamp:
- 10/03/09 03:57:22 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Document/Perl/Beginner.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Document/Perl/Beginner.pm
r8545 r8555 67 67 my $editor = $document->{editor}; 68 68 69 my $line = $editor->LineFromPosition( length($1) ); 69 my $prematch = $1 || ''; 70 my $error_start_position = length($prematch); 71 72 my $line = $editor->LineFromPosition( $error_start_position ); 70 73 ++$line; # Editor starts counting at 0 71 74 … … 78 81 sub check { 79 82 my ( $self, $text ) = @_; 80 $self->{error} = undef; 83 84 # TODO: Change this back to undef: 85 $self->{error} = ''; 81 86 82 87 =item * … … 210 215 211 216 if ( ( $text =~ /^(.*?)open[\s\t\r\n]*\(?\$?\w+[\s\t\r\n]*(\,.+?)?[\s\t\r\n]*\,[\s\t\r\n]*?([\"\'])(.*?)\|(.*?)\2/ ) 212 and ( length($ 3) > 0 )213 and ( length($ 4) > 0 ) )217 and ( length($4) > 0 ) 218 and ( length($5) > 0 ) ) 214 219 { 220 print STDERR join(',',map { "[[$_]]"; }($1,$2,$3,$4,$5,$6))."\n"; 215 221 $self->_report("Using a | char in open without a | at the beginning or end is usually a typo."); 216 222 return; … … 236 242 =cut 237 243 238 if ( $text =~ m {^(.*?)\=\~ [\s\t\r\n]* \/ \^? [\+\*\?\{] }xs ) {244 if ( $text =~ m/^(.*?)\=\~ [\s\t\r\n]* \/ \^? [\+\*\?\{] /xs ) { 239 245 $self->_report( 240 246 "A regular expression starting with a quantifier ( + * ? { ) doesn't make sense, you may want to escape it with a \\."
Note: See TracChangeset
for help on using the changeset viewer.
