Skip to content

Commit

Permalink
cleaned everything up with new perltidy
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 9, 2012
1 parent 55ca84d commit 4fabfea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,4 +1,7 @@

3.66 2012-12-10
- Improved documentation.

3.65 2012-12-09
- Added upgrade method to Mojo::UserAgent::Transactor.
- Added is_range method to Mojo::Asset.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Message/Request.pm
Expand Up @@ -256,7 +256,7 @@ sub _parse_env {

# Remove SCRIPT_NAME prefix if necessary
my $buffer = $path->to_string;
$value =~ s!^/|/$!!g;
$value =~ s!^/|/$!!g;
$buffer =~ s!^/?\Q$value\E/?!!;
$buffer =~ s!^/!!;
$path->parse($buffer);
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Path.pm
Expand Up @@ -77,7 +77,7 @@ sub parse {
$path = url_unescape $path // '';
my $charset = $self->charset;
$path = decode($charset, $path) // $path if $charset;
$self->leading_slash($path =~ s!^/!! ? 1 : undef);
$self->leading_slash($path =~ s!^/!! ? 1 : undef);
$self->trailing_slash($path =~ s!/$!! ? 1 : undef);

return $self->parts([split '/', $path, -1]);
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -34,7 +34,7 @@ my %ENTITIES;
# Reverse entities for html_escape (without "apos")
my %REVERSE = ("\x{0027}" => '#39;');
$REVERSE{$ENTITIES{$_}} //= $_
for sort { @{[$a =~ /[A-Z]/g]} <=> @{[$b =~ /[A-Z]/g]} }
for sort { @{[$a =~ /[A-Z]/g]} <=> @{[$b =~ /[A-Z]/g]} }
sort grep {/;/} keys %ENTITIES;

# Encoding cache
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -38,7 +38,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Rainbow';
our $VERSION = '3.65';
our $VERSION = '3.66';

sub AUTOLOAD {
my $self = shift;
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious/Command/routes.pm
Expand Up @@ -68,10 +68,10 @@ sub _draw {
# Regex
my $pattern = $node->[1]->pattern;
$pattern->match('/', $node->[1]->is_endpoint);
my $regex = (regexp_pattern $pattern->regex)[0];
my $format = (regexp_pattern $pattern->format_regex || '')[0];
my $optional = !$pattern->constraints->{format}
|| $pattern->defaults->{format};
my $regex = (regexp_pattern $pattern->regex)[0];
my $format = (regexp_pattern $pattern->format_regex || '')[0];
my $optional
= !$pattern->constraints->{format} || $pattern->defaults->{format};
$format .= '?' if $format && $optional;
push @parts, $format ? "$regex$format" : $regex if $verbose;

Expand Down

0 comments on commit 4fabfea

Please sign in to comment.