carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
foreach my $arg (@args) {
utf8::encode($arg) if utf8::is_utf8($arg);
- }
- s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
- if (blessed $path) { # Action object only.
- s|/|%2F|g for @args;
+ $arg =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
}
if ( blessed($path) ) { # action object
+ s|/|%2F|g for @args;
my $captures = [ map { s|/|%2F|g; $_; }
( scalar @args && ref $args[0] eq 'ARRAY'
? @{ shift(@args) }
$path = '/' if $path eq '';
}
- undef($path) if (defined $path && $path eq '');
-
unshift(@args, $path);
unless (defined $path && $path =~ s!^/!!) { # in-place strip
} @{ $plugins };
for my $plugin ( reverse @plugins ) {
- Class::MOP::load_class($plugin->[0]);
# pass along $plugin->[1] as well once cmop supports it
+ Class::MOP::load_class($plugin->[0]);
my $meta = find_meta($plugin->[0]);
next if $meta && $meta->isa('Moose::Meta::Role');
}
my @roles =
- map { $_->[0]->name, $_->[1] }
- grep { $_->[0] && blessed($_->[0]) && $_->[0]->isa('Moose::Meta::Role') }
- map { [find_meta($_->[0]), $_->[1]] }
+ map { $_->[0]->name, $_->[1] }
+ grep { blessed($_->[0]) && $_->[0]->isa('Moose::Meta::Role') }
+ map { [find_meta($_->[0]), $_->[1]] }
@plugins;
Moose::Util::apply_all_roles(
willert: Sebastian Willert <willert@cpan.org>
+wreis: Wallace Reis <wallace@reis.org.br>
+
Yuval Kogman, C<nothingmuch@woobling.org>
=head1 LICENSE