Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more documentation tweaks
  • Loading branch information
kraih committed May 21, 2012
1 parent 014486f commit c6fa65b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/Exception.pm
Expand Up @@ -126,8 +126,7 @@ sub _detect {
my $num = shift;
my $new = "$name line $num";
my $line = $lines[0]->[$num];
$new .= qq{, near "$line"} if defined $line;
return $new .= '.';
return defined $line ? qq{$new, near "$line".} : "$new.";
};
$message =~ s/\(eval\s+\d+\) line (\d+).*/$filter->($1)/ge;
$self->message($message);
Expand Down
2 changes: 2 additions & 0 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -452,6 +452,7 @@ Open TCP connection with C<client_class>, which is usually
L<Mojo::IOLoop::Client>, takes the same arguments as
L<Mojo::IOLoop::Client/"connect">.
# Connect to localhost on port 3000
Mojo::IOLoop->client({port => 3000} => sub {
my ($loop, $err, $stream) = @_;
...
Expand Down Expand Up @@ -532,6 +533,7 @@ Accept TCP connections with C<server_class>, which is usually
L<Mojo::IOLoop::Server>, takes the same arguments as
L<Mojo::IOLoop::Server/"listen">.
# Listen on port 3000
Mojo::IOLoop->server({port => 3000} => sub {
my ($loop, $stream, $id) = @_;
...
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Loader.pm
Expand Up @@ -35,7 +35,7 @@ sub search {
# Check all directories
my (@modules, %found);
for my $directory (@INC) {
next unless -d (my $path = catdir $directory, (split /::/, $namespace));
next unless -d (my $path = catdir $directory, split(/::/, $namespace));

# List "*.pm" files in directory
opendir(my $dir, $path);
Expand Down

0 comments on commit c6fa65b

Please sign in to comment.