return join q{, }, @items, "and $tail";
}
+sub quoted_english_list {
+ return qq{'$_[0]'} if @_ == 1;
+
+ my @items = sort @_;
+
+ return qq{'$items[0]' and '$items[1]'} if @items == 2;
+
+ my $tail = pop @items;
+
+ return join q{, }, (map{ qq{'$_'} } @items), qq{and '$tail'};
+}
+
# common utilities
sub not_supported{
require 'Data/Dumper.pm'; # we don't want to create its namespace
my $dd = Data::Dumper->new([$self]);
- $dd->Maxdepth(defined($maxdepth) ? $maxdepth : 2);
+ $dd->Maxdepth(defined($maxdepth) ? $maxdepth : 3);
$dd->Indent(1);
return $dd->Dump();
}
# general does() method
-sub does :method;
-*does = \&does_role; # alias
+sub does :method {
+ goto &does_role;
+}
1;
__END__