Skip to content

Commit

Permalink
more consistent Mojo::Util examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 31, 2013
1 parent 3ca79dc commit 86a9b82
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.23 2013-07-31
4.23 2013-08-01
- Added redirects method to Mojo::Transaction::HTTP.

4.22 2013-07-30
Expand Down
22 changes: 16 additions & 6 deletions lib/Mojo/Util.pm
Expand Up @@ -427,19 +427,29 @@ Convert snake_case string to CamelCase and replace C<-> with C<::>.
Convert a class name to a file.
Foo::Bar -> foo_bar
FOO::Bar -> foobar
FooBar -> foo_bar
FOOBar -> foobar
# "foo_bar"
class_to_file 'Foo::Bar';
# "foobar"
class_to_file 'FOO::Bar';
# "foo_bar"
class_to_file 'FooBar';
# "foobar"
class_to_file 'FOOBar';
=head2 class_to_path
my $path = class_to_path 'Foo::Bar';
Convert class name to path.
Foo::Bar -> Foo/Bar.pm
FooBar -> FooBar.pm
# "Foo/Bar.pm"
class_to_path 'Foo::Bar';
# "FooBar.pm"
class_to_path 'FooBar';
=head2 decamelize
Expand Down

0 comments on commit 86a9b82

Please sign in to comment.