use Tree::Simple qw/use_weak_refs/;
use Tree::Simple::Visitor::FindByUID;
use attributes;
+use utf8;
use Carp qw/croak/;
__PACKAGE__->mk_accessors(
my $params =
( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
+ for my $value ( values %$params ) {\r
+ my $isa_ref = ref $value;\r
+ if( $isa_ref and $isa_ref ne 'ARRAY' ) {\r
+ croak( "Non-array reference ($isa_ref) passed to uri_for()" );\r
+ }\r
+ utf8::encode( $_ ) for $isa_ref ? @$value : $value;\r
+ };
+
# join args with '/', or a blank string
my $args = ( scalar @args ? '/' . join( '/', @args ) : '' );
$args =~ s/^\/// unless $path;