Skip Menu |

This queue is for tickets about the HTTP-Server-Brick CPAN distribution.

Report information
The Basics
Id: 84718
Status: resolved
Priority: 0/
Queue: HTTP-Server-Brick

People
Owner: mark [...] aufflick.com
Requestors: g.grigelionis [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: mount must return $self
Date: Thu, 18 Apr 2013 17:07:01 +0200
To: bug-HTTP-Server-Brick [...] rt.cpan.org
From: Gintautas Grigelionis <g.grigelionis [...] gmail.com>
... for oneliners like perl -I... -MHTTP::Server::Brick -e "HTTP::Server::Brick->new(...)->mount(...)->start" mount() should default to mount('/' => { path => '.' }) so that the above chain could be "short-circuited" to a meaningful ->new()->start? ("make currect directory exposed through HTTP"). Regards, Gintas
Subject: Re: [rt.cpan.org #84718] mount must return $self
Date: Fri, 19 Apr 2013 11:17:50 +1000
To: bug-HTTP-Server-Brick [...] rt.cpan.org
From: Mark Aufflick <mark [...] pumptheory.com>
That's a great idea - thanks! -- Mark Aufflick Pumptheory http://pumptheory.com On Friday, 19 April 2013 at 1:07 AM, Gintautas Grigelionis via RT wrote: Show quoted text
> Thu Apr 18 11:07:18 2013: Request 84718 was acted upon. > Transaction: Ticket created by g.grigelionis@gmail.com (mailto:g.grigelionis@gmail.com) > Queue: HTTP-Server-Brick > Subject: mount must return $self > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: g.grigelionis@gmail.com (mailto:g.grigelionis@gmail.com) > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=84718 > > > > ... for oneliners like perl -I... -MHTTP::Server::Brick -e > "HTTP::Server::Brick->new(...)->mount(...)->start" > > mount() should default to mount('/' => { path => '.' }) so that the above > chain could be "short-circuited" to a meaningful ->new()->start? > ("make currect directory exposed through HTTP"). > > Regards, > Gintas > >
I've made the following changes: 1. mount now returns $self 2. as a shortcut, the second argument to mount can be a string (path) or coderef (handler) This allows eg: perl -MHTTP::Server::Brick -e 'HTTP::Server::Brick->new(fork=>1)->mount(qw(/ .))->start' It's not in CPAN yet, but you can check out the git repo: https://github.com/aufflick/p5-http-server-brick
Subject: Re: [rt.cpan.org #84718] mount must return $self
Date: Wed, 14 Aug 2013 15:30:57 +0200
To: bug-HTTP-Server-Brick [...] rt.cpan.org
From: Gintautas Grigelionis <g.grigelionis [...] gmail.com>
Sorry for late reply: great job, just what i wanted! :-D 2013/5/11 Mark Aufflick via RT <bug-HTTP-Server-Brick@rt.cpan.org>: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84718 > > > I've made the following changes: > > 1. mount now returns $self > 2. as a shortcut, the second argument to mount can be a string (path) or coderef (handler) > > This allows eg: > > perl -MHTTP::Server::Brick -e 'HTTP::Server::Brick->new(fork=>1)->mount(qw(/ .))->start' > > It's not in CPAN yet, but you can check out the git repo: > > https://github.com/aufflick/p5-http-server-brick