Skip to content

Commit

Permalink
Item14398: Remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed May 15, 2017
1 parent 69c7b32 commit 3363845
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
30 changes: 20 additions & 10 deletions core/lib/Foswiki/Attrs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,26 @@ sub _friendly {
if ( $string =~ s/^[\s,]*([#a-z0-9_]+)\s*($nameOp)\s*\"(.*?)\"//is ) {
$key = $1;
$Ops{$2}[0]( \$this->{$key}, $3 );
print STDERR "Match1 $key\n";

#print STDERR "Match1 $key\n";
}

# simple double-quoted value with no name, sets the default
elsif ( $string =~ s/^[\s,]*\"(.*?)\"//s ) {
unless ( defined( $this->{_DEFAULT} ) ) {
$key = '_DEFAULT';
$this->{_DEFAULT} = $1;
print STDERR "Match2 $key\n";

#print STDERR "Match2 $key\n";
}
}

# name $op 'value' pairs
elsif ( $string =~ s/^[\s,]*([#a-z0-9_]+)\s*($nameOp)\s*'(.*?)'//is ) {
$key = $1;
$Ops{$2}[0]( \$this->{$key}, $3 );
print STDERR "Match3 $key\n";

#print STDERR "Match3 $key\n";
}

# name $op value pairs
Expand All @@ -223,40 +226,46 @@ sub _friendly {
{
$key = $1;
$Ops{$2}[0]( \$this->{$key}, $3 );
print STDERR "Match4 $key\n";

#print STDERR "Match4 $key\n";
}

# $op "value"
elsif ( $string =~ s/^[\s,]*($nonmOp)\s*\"(.*?)\"//is ) {
$Ops{$1}[1]( \$this->{$key}, $2 );
print STDERR "Match5 $key\n";

#print STDERR "Match5 $key\n";
}

# $op 'value'
elsif ( $string =~ s/^[\s,]*($nonmOp)\s*'(.*?)'//is ) {
$Ops{$1}[1]( \$this->{$key}, $2 );
print STDERR "Match6 $key\n";

#print STDERR "Match6 $key\n";
}

# $op value
elsif ( $string =~ s/^[\s,]*($nonmOp)\s*([^\s,\}\'\"]*)//is ) {
$Ops{$1}[1]( \$this->{$key}, $2 );
print STDERR "Match7 $key\n";

#print STDERR "Match7 $key\n";
}

# simple single-quoted value with no name, sets the default
elsif ( $string =~ s/^[\s,]*'(.*?)'//s ) {
unless ( defined( $this->{_DEFAULT} ) ) {
$key = '_DEFAULT';
$this->{_DEFAULT} = $1;
print STDERR "Match8 $key\n";

#print STDERR "Match8 $key\n";
}
}

# simple name with no value (boolean, or _DEFAULT)
elsif ( $string =~ s/^[\s,]*([a-z][a-z0-9_]*)\b//is ) {
$this->{$1} = 1;
print STDERR "Match9 $1\n";

#print STDERR "Match9 $1\n";
}

# otherwise the whole string - sans padding - is the default
Expand All @@ -267,7 +276,8 @@ sub _friendly {
&& !defined( $this->{_DEFAULT} ) )
{
$this->{_DEFAULT} = $1;
print STDERR "Match10 $1\n";

#print STDERR "Match10 $1\n";
}
last;
}
Expand Down
1 change: 0 additions & 1 deletion core/lib/Foswiki/Render.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,6 @@ sub _renderExistingWikiWord {

my %attrs;
my $href = $this->{session}->getScriptUrl( 0, 'view', $web, $topic );
print STDERR "Returns $href\n";
if ($params) {
$href .= $params;
}
Expand Down

0 comments on commit 3363845

Please sign in to comment.