Permalink
Browse files

fix some undefs caused by the handling of @if@. We really want to kno…

…w if it is defined, not exists
  • Loading branch information...
1 parent 5d8f21c commit b22d2b5c60c292463d1d0340861f1aa5a48d7821 @petdance petdance committed Jul 16, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Text/Textile.pm
View
8 lib/Text/Textile.pm
@@ -1193,10 +1193,10 @@ sub format_tag {
my $self = shift;
my (%args) = @_;
my $tagname = $args{tag};
- my $text = exists $args{text} ? $args{text} : '';
- my $pre = exists $args{pre} ? $args{pre} : '';
- my $post = exists $args{post} ? $args{post} : '';
- my $clsty = exists $args{clsty} ? $args{clsty} : '';
+ my $text = defined $args{text} ? $args{text} : '';
+ my $pre = defined $args{pre} ? $args{pre} : '';
+ my $post = defined $args{post} ? $args{post} : '';
+ my $clsty = defined $args{clsty} ? $args{clsty} : '';
_strip_borders(\$pre, \$post);
my $tag = "<$tagname";
my $attr = $self->format_classstyle($clsty);

0 comments on commit b22d2b5

Please sign in to comment.