Skip Menu |

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

Report information
The Basics
Id: 17533
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: perl-cpan [...] bereft.net
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in:
  • 0.16
  • 0.17
Fixed in: (no value)



Subject: background: use POSIX always loads and imports all
The background sub uses POSIX, which exports everything by default. Since only setsid is used, is used conditionally, and it's used fully qualified, this seems undesirable. sub background { # ... use POSIX; if ( $^O !~ /MSWin32/ ) { POSIX::setsid() or die "Can't start a new session: $!"; } $self->run(); } Maybe instead: eval 'use POSIX ()'; Brad
Subject: Re: [rt.cpan.org #17533] background: use POSIX always loads and imports all
Date: Mon, 15 May 2006 11:24:32 -0400
To: via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Took damn near forever, but this is now in svn. Thanks. I opted for "require" rather than eval "use"; On Wed, Feb 08, 2006 at 09:50:05AM -0500, via RT wrote: Show quoted text
> > Wed Feb 08 09:50:04 2006: Request 17533 was acted upon. > Transaction: Ticket created by BOWMANBS > Queue: HTTP-Server-Simple > Subject: background: use POSIX always loads and imports all > Owner: Nobody > Requestors: BOWMANBS@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17533 > > > > The background sub uses POSIX, which exports everything by default. > Since only setsid is used, is used conditionally, and it's > used fully qualified, this seems undesirable. > > sub background { > # ... > use POSIX; > > if ( $^O !~ /MSWin32/ ) { > POSIX::setsid() > or die "Can't start a new session: $!"; > } > $self->run(); > } > > Maybe instead: > eval 'use POSIX ()'; > > Brad >
--