Skip to content

Commit

Permalink
better absolute path examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 30, 2012
1 parent 1f4af90 commit 8606a7a
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/Asset.pm
Expand Up @@ -82,7 +82,7 @@ False.
=head2 C<move_to>
$asset = $asset->move_to('/foo/bar/baz.txt');
$asset = $asset->move_to('/home/sri/foo.txt');
Move asset data into a specific file, meant to be overloaded in a subclass.
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/Asset/File.pm
Expand Up @@ -161,7 +161,7 @@ Mojo::Asset::File - File storage for HTTP 1.1 content
say $file->slurp;
# Existing file
my $file = Mojo::Asset::File->new(path => '/foo/bar/baz.txt');
my $file = Mojo::Asset::File->new(path => '/home/sri/foo.txt');
$file->move_to('/yada.txt');
say $file->slurp;
Expand Down Expand Up @@ -191,7 +191,7 @@ File handle, created on demand.
=head2 C<path>
my $path = $file->path;
$file = $file->path('/foo/bar/baz.txt');
$file = $file->path('/home/sri/foo.txt');
File path used to create C<handle>, can also be automatically generated if
necessary.
Expand Down Expand Up @@ -235,7 +235,7 @@ True.
=head2 C<move_to>
$file = $file->move_to('/foo/bar/baz.txt');
$file = $file->move_to('/home/sri/bar.txt');
Move asset data into a specific file and disable C<cleanup>.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Asset/Memory.pm
Expand Up @@ -148,7 +148,7 @@ Get chunk of data starting from a specific position.
=head2 C<move_to>
$mem = $mem->move_to('/foo/bar/baz.txt');
$mem = $mem->move_to('/home/sri/foo.txt');
Move asset data into a specific file.
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo/Command.pm
Expand Up @@ -237,13 +237,13 @@ following new ones.
=head2 C<chmod_file>
$command = $command->chmod_file('/home/sri/bar.txt', 0644);
$command = $command->chmod_file('/home/sri/foo.txt', 0644);
Portably change mode of a file.
=head2 C<chmod_rel_file>
$command = $command->chmod_rel_file('foo/bar.txt', 0644);
$command = $command->chmod_rel_file('foo/foo.txt', 0644);
Portably change mode of a file relative to the current working directory.
Expand Down Expand Up @@ -320,7 +320,7 @@ Render a template from the C<DATA> section of the command class.
=head2 C<render_to_file>
$command = $command->render_to_file('foo_bar', '/home/sri/bar.txt');
$command = $command->render_to_file('foo_bar', '/home/sri/foo.txt');
Render a template from the C<DATA> section of the command class to a file.
Expand All @@ -340,7 +340,7 @@ Run command. Meant to be overloaded in a subclass.
=head2 C<write_file>
$command = $command->write_file('/home/sri/bar.txt', 'Hello World!');
$command = $command->write_file('/home/sri/foo.txt', 'Hello World!');
Portably write text to a file.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Home.pm
Expand Up @@ -151,7 +151,7 @@ following new ones.
=head2 C<new>
my $home = Mojo::Home->new;
my $home = Mojo::Home->new('/foo/bar');
my $home = Mojo::Home->new('/home/sri/myapp');
Construct a new L<Mojo::Home> object.
Expand Down Expand Up @@ -187,7 +187,7 @@ Path to C<lib> directory in which L<Mojolicious> is installed.
=head2 C<parse>
$home = $home->parse('/foo/bar');
$home = $home->parse('/home/sri/myapp');
Parse home directory.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Upload.pm
Expand Up @@ -29,7 +29,7 @@ Mojo::Upload - Upload container
my $upload = Mojo::Upload->new;
say $upload->filename;
$upload->move_to('/foo/bar/baz.txt');
$upload->move_to('/home/sri/foo.txt');
=head1 DESCRIPTION
Expand Down Expand Up @@ -74,7 +74,7 @@ following new ones.
=head2 C<move_to>
$upload->move_to('/foo/bar/baz.txt');
$upload->move_to('/home/sri/foo.txt');
Alias for L<Mojo::Asset::File/"move_to">.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious.pm
Expand Up @@ -316,7 +316,7 @@ L<Mojolicious::Plugin::EPRenderer> and L<Mojolicious::Plugin::EPLRenderer>
contain more information.
# Add another "templates" directory
push @{$app->renderer->paths}, '/foo/bar/templates';
push @{$app->renderer->paths}, '/home/sri/templates';
# Add another class with templates in DATA section
push @{$app->renderer->classes}, 'Mojolicious::Plugin::Fun';
Expand Down Expand Up @@ -365,7 +365,7 @@ For serving static files from your C<public> directories, defaults to a
L<Mojolicious::Static> object.
# Add another "public" directory
push @{$app->static->paths}, '/foo/bar/public';
push @{$app->static->paths}, '/home/sri/public';
# Add another class with static files in DATA section
push @{$app->static->classes}, 'Mojolicious::Plugin::Fun';
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Renderer.pm
Expand Up @@ -329,12 +329,12 @@ Registered helpers.
=head2 C<paths>
my $paths = $renderer->paths;
$renderer = $renderer->paths(['/foo/bar/templates']);
$renderer = $renderer->paths(['/home/sri/templates']);
Directories to look for templates in, first one has the highest precedence.
# Add another "templates" directory
push @{$renderer->paths}, '/foo/bar/templates';
push @{$renderer->paths}, '/home/sri/templates';
=head1 METHODS
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Static.pm
Expand Up @@ -199,12 +199,12 @@ highest precedence, defaults to C<main>.
=head2 C<paths>
my $paths = $static->paths;
$static = $static->paths(['/foo/bar/public']);
$static = $static->paths(['/home/sri/public']);
Directories to serve static files from, first one has the highest precedence.
# Add another "public" directory
push @{$static->paths}, '/foo/bar/public';
push @{$static->paths}, '/home/sri/public';
=head1 METHODS
Expand Down

0 comments on commit 8606a7a

Please sign in to comment.