Skip to content

Instantly share code, notes, and snippets.

@nperez
Created November 20, 2009 21:49
Show Gist options
  • Save nperez/239818 to your computer and use it in GitHub Desktop.
Save nperez/239818 to your computer and use it in GitHub Desktop.
--- /home/nicholas/installed/perl5.10.1/lib/5.10.1/Text/Balanced.pm 2009-11-20 15:38:11.085852509 -0600
+++ Balanced.pm 2009-11-20 15:38:00.451977193 -0600
@@ -643,9 +643,10 @@
sub extract_quotelike (;$$)
{
- my $textref = $_[0] ? \$_[0] : \$_;
+ my ($text, $preamble) = @_;
+ my $textref = \$text;
my $wantarray = wantarray;
- my $pre = defined $_[1] ? $_[1] : '\s*';
+ my $pre = defined $preamble ? $preamble : '\s*';
my @match = _match_quotelike($textref,$pre,1,0);
return _fail($wantarray, $textref) unless @match;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment