Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changed heading style
  • Loading branch information
kraih committed Jan 7, 2013
1 parent 17f4b7a commit 31faa34
Show file tree
Hide file tree
Showing 99 changed files with 1,160 additions and 1,160 deletions.
14 changes: 7 additions & 7 deletions lib/Mojo.pm
Expand Up @@ -101,7 +101,7 @@ See L<Mojolicious> for more!
L<Mojo> implements the following attributes.
=head2 C<home>
=head2 home
my $home = $app->home;
$app = $app->home(Mojo::Home->new);
Expand All @@ -112,7 +112,7 @@ which stringifies to the actual path.
# Generate portable path relative to home directory
my $path = $app->home->rel_file('data/important.txt');
=head2 C<log>
=head2 log
my $log = $app->log;
$app = $app->log(Mojo::Log->new);
Expand All @@ -122,7 +122,7 @@ The logging layer of your application, defaults to a L<Mojo::Log> object.
# Log debug message
$app->log->debug('It works!');
=head2 C<ua>
=head2 ua
my $ua = $app->ua;
$app = $app->ua(Mojo::UserAgent->new);
Expand All @@ -140,21 +140,21 @@ interfere with new blocking ones.
L<Mojo> inherits all methods from L<Mojo::Base> and implements the following
new ones.
=head2 C<new>
=head2 new
my $app = Mojo->new;
Construct a new L<Mojo> application. Will automatically detect your home
directory and set up logging to C<log/mojo.log> if there's a C<log> directory.
=head2 C<build_tx>
=head2 build_tx
my $tx = $app->build_tx;
Transaction builder, defaults to building a L<Mojo::Transaction::HTTP>
object.
=head2 C<config>
=head2 config
my $config = $app->config;
my $foo = $app->config('foo');
Expand All @@ -168,7 +168,7 @@ Application configuration.
my $foo = $app->config->{foo};
delete $app->config->{foo};
=head2 C<handler>
=head2 handler
$app->handler(Mojo::Transaction::HTTP->new);
Expand Down
20 changes: 10 additions & 10 deletions lib/Mojo/Asset.pm
Expand Up @@ -48,14 +48,14 @@ L<Mojo::Asset> inherits all events from L<Mojo::EventEmitter>.
L<Mojo::Asset> implements the following attributes.
=head2 C<end_range>
=head2 end_range
my $end = $asset->end_range;
$asset = $asset->end_range(8);
Pretend file ends earlier.
=head2 C<start_range>
=head2 start_range
my $start = $asset->start_range;
$asset = $asset->start_range(0);
Expand All @@ -67,51 +67,51 @@ Pretend file starts later.
L<Mojo::Asset> inherits all methods from L<Mojo::EventEmitter> and implements
the following new ones.
=head2 C<add_chunk>
=head2 add_chunk
$asset = $asset->add_chunk('foo bar baz');
Add chunk of data to asset. Meant to be overloaded in a subclass.
=head2 C<contains>
=head2 contains
my $position = $asset->contains('bar');
Check if asset contains a specific string. Meant to be overloaded in a
subclass.
=head2 C<get_chunk>
=head2 get_chunk
my $chunk = $asset->get_chunk($offset);
Get chunk of data starting from a specific position. Meant to be overloaded
in a subclass.
=head2 C<is_file>
=head2 is_file
my $false = $asset->is_file;
False.
=head2 C<is_range>
=head2 is_range
my $success = $asset->is_range;
Check if asset has a C<start_range> or C<end_range>.
=head2 C<move_to>
=head2 move_to
$asset = $asset->move_to('/home/sri/foo.txt');
Move asset data into a specific file. Meant to be overloaded in a subclass.
=head2 C<size>
=head2 size
my $size = $asset->size;
Size of asset data in bytes. Meant to be overloaded in a subclass.
=head2 C<slurp>
=head2 slurp
my $string = $asset->slurp;
Expand Down
22 changes: 11 additions & 11 deletions lib/Mojo/Asset/File.pm
Expand Up @@ -174,29 +174,29 @@ L<Mojo::Asset::File> inherits all events from L<Mojo::Asset>.
L<Mojo::Asset::File> inherits all attributes from L<Mojo::Asset> and
implements the following new ones.
=head2 C<cleanup>
=head2 cleanup
my $cleanup = $file->cleanup;
$file = $file->cleanup(1);
Delete file automatically once it's not used anymore.
=head2 C<handle>
=head2 handle
my $handle = $file->handle;
$file = $file->handle(IO::File->new);
File handle, created on demand.
=head2 C<path>
=head2 path
my $path = $file->path;
$file = $file->path('/home/sri/foo.txt');
File path used to create C<handle>, can also be automatically generated if
necessary.
=head2 C<tmpdir>
=head2 tmpdir
my $tmpdir = $file->tmpdir;
$file = $file->tmpdir('/tmp');
Expand All @@ -209,43 +209,43 @@ C<MOJO_TMPDIR> environment variable or auto detection.
L<Mojo::Asset::File> inherits all methods from L<Mojo::Asset> and implements
the following new ones.
=head2 C<add_chunk>
=head2 add_chunk
$file = $file->add_chunk('foo bar baz');
Add chunk of data.
=head2 C<contains>
=head2 contains
my $position = $file->contains('bar');
Check if asset contains a specific string.
=head2 C<get_chunk>
=head2 get_chunk
my $chunk = $file->get_chunk($start);
Get chunk of data starting from a specific position.
=head2 C<is_file>
=head2 is_file
my $true = $file->is_file;
True.
=head2 C<move_to>
=head2 move_to
$file = $file->move_to('/home/sri/bar.txt');
Move asset data into a specific file and disable C<cleanup>.
=head2 C<size>
=head2 size
my $size = $file->size;
Size of asset data in bytes.
=head2 C<slurp>
=head2 slurp
my $string = $file->slurp;
Expand Down
20 changes: 10 additions & 10 deletions lib/Mojo/Asset/Memory.pm
Expand Up @@ -76,7 +76,7 @@ L<Mojo::Asset::Memory> is an in-memory storage backend for HTTP content.
L<Mojo::Asset::Memory> inherits all events from L<Mojo::Asset> and can emit
the following new ones.
=head2 C<upgrade>
=head2 upgrade
$mem->on(upgrade => sub {
my ($mem, $file) = @_;
Expand All @@ -95,15 +95,15 @@ Emitted when asset gets upgraded to a L<Mojo::Asset::File> object.
L<Mojo::Asset::Memory> inherits all attributes from L<Mojo::Asset> and
implements the following new ones.
=head2 C<auto_upgrade>
=head2 auto_upgrade
my $upgrade = $mem->auto_upgrade;
$mem = $mem->auto_upgrade(1);
Try to detect if content size exceeds C<max_memory_size> limit and
automatically upgrade to a L<Mojo::Asset::File> object.
=head2 C<max_memory_size>
=head2 max_memory_size
my $size = $mem->max_memory_size;
$mem = $mem->max_memory_size(1024);
Expand All @@ -117,44 +117,44 @@ C<MOJO_MAX_MEMORY_SIZE> environment variable or C<262144>.
L<Mojo::Asset::Memory> inherits all methods from L<Mojo::Asset> and implements
the following new ones.
=head2 C<new>
=head2 new
my $mem = Mojo::Asset::Memory->new;
Construct a new L<Mojo::Asset::Memory> object.
=head2 C<add_chunk>
=head2 add_chunk
$mem = $mem->add_chunk('foo bar baz');
my $file = $mem->add_chunk('abc' x 262144);
Add chunk of data and upgrade to L<Mojo::Asset::File> object if necessary.
=head2 C<contains>
=head2 contains
my $position = $mem->contains('bar');
Check if asset contains a specific string.
=head2 C<get_chunk>
=head2 get_chunk
my $chunk = $mem->get_chunk($offset);
Get chunk of data starting from a specific position.
=head2 C<move_to>
=head2 move_to
$mem = $mem->move_to('/home/sri/foo.txt');
Move asset data into a specific file.
=head2 C<size>
=head2 size
my $size = $mem->size;
Size of asset data in bytes.
=head2 C<slurp>
=head2 slurp
my $string = mem->slurp;
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo/Base.pm
Expand Up @@ -180,7 +180,7 @@ All three forms save a lot of typing.
L<Mojo::Base> exports the following functions if imported with the C<-base>
flag or a base class.
=head2 C<has>
=head2 has
has 'name';
has [qw(name1 name2 name3)];
Expand All @@ -195,7 +195,7 @@ Create attributes for hash-based objects, just like the C<attr> method.
L<Mojo::Base> implements the following methods.
=head2 C<new>
=head2 new
my $object = BaseSubClass->new;
my $object = BaseSubClass->new(name => 'value');
Expand All @@ -204,7 +204,7 @@ L<Mojo::Base> implements the following methods.
This base class provides a basic constructor for hash-based objects. You can
pass it either a hash or a hash reference with attribute values.
=head2 C<attr>
=head2 attr
$object->attr('name');
BaseSubClass->attr('name');
Expand All @@ -221,7 +221,7 @@ be excuted at accessor read time if there's no set value. Accessors can be
chained, that means they return their invocant when they are called with an
argument.
=head2 C<tap>
=head2 tap
$object = $object->tap(sub {...});
Expand Down

0 comments on commit 31faa34

Please sign in to comment.