Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 72867
Status: open
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc: mst [...] shadowcat.co.uk
AdminCc:

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



Subject: Modules with underscores in namespaces missing from provides section of META file
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 637
Download (untitled) / with headers
text/plain 637b
I am working on some "internal" modules for my employer, so the module namespaces have underscores, so as to differentiate them from CPAN modules that might have the same namespace, e.g. package _Company::Foo; or package App::_foo; These are valid package names, and Perl has no problems with them. (I've also been told in the past to use underscore prefixes for internal/local namespaces.) It seems that the underscore prevents Module::Build from identifying the package name. A workaround for me is to rename the package name, of course, but it would make sense to fix a bug that prevents it from recognising valid namespaces.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6890-1322747742-1292.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 950
Download (untitled) / with headers
text/plain 950b
This appears to be by design, so that "private" modules may be included in a distribution but not indexed by CPAN. Other than omitting the package from "provides" in META, are there other problems that this causes for you? -- David On Thu Dec 01 07:37:32 2011, RRWO wrote: Show quoted text
> I am working on some "internal" modules for my employer, so the module > namespaces have underscores, so as to differentiate them from CPAN > modules that might have the same namespace, e.g. > > package _Company::Foo; > > or > > package App::_foo; > > These are valid package names, and Perl has no problems with them. (I've > also been told in the past to use underscore prefixes for internal/local > namespaces.) > > It seems that the underscore prevents Module::Build from identifying the > package name. A workaround for me is to rename the package name, of > course, but it would make sense to fix a bug that prevents it from > recognising valid namespaces.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6890-1322747742-1292.72867-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-6890-1322747742-1292.72867-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6890-1322755122-1340.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 681
Download (untitled) / with headers
text/plain 681b
I am working on some utilities that process a private CPAN repository that includes private modules, and the CPAN modules that these utilities use fail because the private modules are not listed in the "provides" section. So in my case, I need the private modules to be indexed. An option in Build.PL to enable this would help, as I'd like them indexed in the private CPAN repository. On Thu Dec 01 08:55:42 2011, DAGOLDEN wrote: Show quoted text
> This appears to be by design, so that "private" modules may be included > in a distribution but not indexed by CPAN. > > Other than omitting the package from "provides" in META, are there other > problems that this causes for you? > > -- David
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6890-1322755122-1340.72867-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-6890-1322747742-1292.72867-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322755122-1340.72867-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6893-1322762237-1265.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 539
Download (untitled) / with headers
text/plain 539b
On Thu Dec 01 10:58:42 2011, RRWO wrote: Show quoted text
> > I am working on some utilities that process a private CPAN repository > that includes private modules, and the CPAN modules that these utilities > use fail because the private modules are not listed in the "provides" > section.
In the absence of a provides key, PAUSE seems to index such distributions. I suspect it's actually Module::Metadata not spotting them - could you have a look and see if you can put together a failing test (and if you're feeling really generous, a patch :) for it?
From schwern [...] pobox.com Thu Dec 1 14: 52:57 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.646 tagged_above=-99.9 required=10 tests=[AWL=-0.425, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6890-1322747742-1732.72867-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-72867 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322747742-1732.72867-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4ED7DB0F.2060009 [...] pobox.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.646
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] pobox.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=schwern [...] pobox.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id ECDE5240FDD for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Thu, 1 Dec 2011 14:52:56 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9FdhGA87NJ6T for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Thu, 1 Dec 2011 14:52:55 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 427C3240FCC for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 14:52:55 -0500 (EST)
Received: (qmail 20360 invoked by uid 103); 1 Dec 2011 19:52:54 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Dec 2011 19:52:54 -0000
Received: from b-pb-sasl-quonix.pobox.com (HELO smtp.pobox.com) (208.72.237.35) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 01 Dec 2011 11:52:53 -0800
Received: from smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 160726394 for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 14:52:50 -0500 (EST)
Received: from b-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 0E2416393 for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 14:52:50 -0500 (EST)
Received: from [10.23.42.10] (unknown [97.120.54.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 8DEDA6391 for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 14:52:48 -0500 (EST)
Delivered-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0
Subject: Re: [rt.cpan.org #72867] Modules with underscores in namespaces missing from provides section of META file
Domainkey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=Xzn2Lz kzSu1qISRo5B+LFKK494SEpO9Nr6PmNkqWPmXXFJQLWVyw+z9xQxpJ3MPL4WrNfX aiMVW89cLlBLH8fqsatwLin23Qy2uWeAg5dFwT4TH/ut2oPYkivbvq2118KWBVNn zRa5XX9m3se1Tq1LeucfofD/MmZrAIq2q0aFQ=
Return-Path: <schwern [...] pobox.com>
Dkim-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=+kkMpj3EmS0N EnLMS4H3tIMOsdc=; b=ggXReETKigcGeO5d6Ho+zcdSN2Kj/TAfXg7Mn8R3AhEf vP2eEXdcKHvIo2QJs/Ore60XdzaJsk/YoGyTX8F6AM55ns0ZHeOmmpleWRNPWiAN 3Z46C1Rue+rr25AHocSzO5+zkKh/rMSaCc+n1zS7l01ltSJR4tdEVY+Nsbuq43E=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
X-RT-Mail-Extension: module-build
Date: Thu, 01 Dec 2011 11:52:47 -0800
X-Spam-Level:
To: bug-Module-Build [...] rt.cpan.org
X-Enigmail-Version: 1.3.3
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: 0BB6B448-1C56-11E1-8F43-9DB42E706CDE-02258300!b-pb-sasl-quonix.pobox.com
From: Michael G Schwern <schwern [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-12654-1322769177-589.72867-0-0 [...] rt.cpan.org>
Content-Length: 476
Download (untitled) / with headers
text/plain 476b
On 2011.12.1 5:55 AM, David Golden via RT wrote: Show quoted text
> This appears to be by design, so that "private" modules may be included > in a distribution but not indexed by CPAN.
Do we need this heuristic? If you don't want something indexed, you can put it into no_index. If we do need this heuristic, maybe a simple switch to turn it off? -- But there's no sense crying over every mistake. You just keep on trying till you run out of cake. -- Jonathan Coulton, "Still Alive"
From david [...] autopragmatic.com Thu Dec 1 15: 09:01 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-7.249 tagged_above=-99.9 required=10 tests=[AWL=-0.349, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6893-1322762237-1828.72867-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-72867 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322747742-1292.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322755122-1340.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6893-1322762237-1828.72867-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <CAOeq1c9dxbrc++u714aM6K60SEnABaHMPQdny1uL2GTb=PzYQQ [...] mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -7.249
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] autopragmatic.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 1A52D240FCC for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Thu, 1 Dec 2011 15:09:01 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vBC+wczutJjZ for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Thu, 1 Dec 2011 15:08:59 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 99A38240FC4 for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 15:08:59 -0500 (EST)
Received: (qmail 21576 invoked by uid 103); 1 Dec 2011 20:08:58 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Dec 2011 20:08:58 -0000
Received: from mail-ey0-f178.google.com (HELO mail-ey0-f178.google.com) (209.85.215.178) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 01 Dec 2011 12:08:56 -0800
Received: by eaac13 with SMTP id c13so1383531eaa.9 for <bug-Module-Build [...] rt.cpan.org>; Thu, 01 Dec 2011 12:08:53 -0800 (PST)
Received: by 10.216.135.223 with SMTP id u73mr896194wei.73.1322770133240; Thu, 01 Dec 2011 12:08:53 -0800 (PST)
Received: by 10.180.85.231 with HTTP; Thu, 1 Dec 2011 12:08:32 -0800 (PST)
Delivered-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #72867] Modules with underscores in namespaces missing from provides section of META file
Return-Path: <david [...] autopragmatic.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autopragmatic.com; s=google; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=lYLk4HjAqZg5eLYy7C+krCNxJDXzGs+yMa7jHJN6bGU=; b=XUkwS7y3+TA+JOelHBczM06/3ztvPZ17qCPwMNw2Stt4i8S4VpHwcVNN+lJOb/n0hf tfXWGEUVmCsSWVF9/hL095IZa6xF0bWmnaM82EdvA5EOrGYmJ2jH35myTvHRczrKjRB7 mcRWqF7aRDz+3Tyb2PHMBs3UGddL6NomIVCNk=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
X-RT-Mail-Extension: module-build
X-Google-Sender-Auth: KUkh_Xqxx7SspQTYANZaM2UzUeQ
Sender: david [...] autopragmatic.com
Date: Thu, 1 Dec 2011 15:08:32 -0500
X-Spam-Level:
To: bug-Module-Build [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: David Golden <dagolden [...] cpan.org>
RT-Message-ID: <rt-3.8.HEAD-13645-1322770141-524.72867-0-0 [...] rt.cpan.org>
Content-Length: 679
Download (untitled) / with headers
text/plain 679b
On Thu, Dec 1, 2011 at 12:57 PM, MSTROUT via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> In the absence of  a provides key, PAUSE seems to index such > distributions. I suspect it's actually Module::Metadata not spotting > them - could you have a look and see if you can put together a failing > test (and if you're feeling really generous, a patch :) for it?
It's not Module::Metadata. I checked. It's line 4807 in Module::Build::Base (in the repo version of the file): next if grep /^_/, split( /::/, $package ); # private package, ignore git blame says Randy Sims wrote it in 2005. I agree with Schwern that with "no_index" we might not need it anymore. -- David
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-13645-1322770141-524.72867-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-72867 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322747742-1292.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322755122-1340.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6893-1322762237-1828.72867-5-0 [...] rt.cpan.org> <CAOeq1c9dxbrc++u714aM6K60SEnABaHMPQdny1uL2GTb=PzYQQ [...] mail.gmail.com> <rt-3.8.HEAD-13645-1322770141-524.72867-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12654-1322770797-964.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 681
Download (untitled) / with headers
text/plain 681b
It seems like the real conflict here might be between 2 versions of what "private package" means. [And no, neither of them is what you're thinking.] IIUC, Robert seems to want it to mean "APIs only used within my company". But the established meaning within the tools is "stuff that's not part of any API". It's just like a "private" qualifier in Java, though less forceful. So I do think it's appropriate for anything with an underscore, or leading underscore, or whatever the convention is, not to be put into 'provides' unless the user overrides that. If you want a namespace for company stuff, just so you don't conflict with module Foo, why not just use MyCompany::Foo?
From schwern [...] pobox.com Thu Dec 1 15: 42:54 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.638 tagged_above=-99.9 required=10 tests=[AWL=-0.417, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-12654-1322770797-396.72867-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-72867 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322747742-1292.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322755122-1340.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6893-1322762237-1828.72867-5-0 [...] rt.cpan.org> <CAOeq1c9dxbrc++u714aM6K60SEnABaHMPQdny1uL2GTb=PzYQQ [...] mail.gmail.com> <rt-3.8.HEAD-13645-1322770141-524.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-12654-1322770797-396.72867-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4ED7E6C2.6070008 [...] pobox.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.638
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] pobox.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=schwern [...] pobox.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D9D6924100F for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Thu, 1 Dec 2011 15:42:54 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id htONE40J+cwP for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Thu, 1 Dec 2011 15:42:53 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 20E55240FC4 for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 15:42:52 -0500 (EST)
Received: (qmail 24480 invoked by uid 103); 1 Dec 2011 20:42:52 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Dec 2011 20:42:52 -0000
Received: from b-pb-sasl-quonix.pobox.com (HELO smtp.pobox.com) (208.72.237.35) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 01 Dec 2011 12:42:48 -0800
Received: from smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id AC0DC42E0 for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 15:42:44 -0500 (EST)
Received: from b-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id A428242DF for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 15:42:44 -0500 (EST)
Received: from [10.23.42.10] (unknown [97.120.54.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id F3ABE42DE for <bug-Module-Build [...] rt.cpan.org>; Thu, 1 Dec 2011 15:42:43 -0500 (EST)
Delivered-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0
Subject: Re: [rt.cpan.org #72867] Modules with underscores in namespaces missing from provides section of META file
Domainkey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=WWpGi3 sLwmin1ETpwtuWfXy+MFXN1HpOzBZIzn0na3S/3/z3QdC1jc8xTvwHVkeuTUcTai JSq6LQ2XfWbF+1jWkVCBdPAo0XCqPo/hIjJXKluNZXRGJd4W4SuF9jrTmhfWkNUE avBoqYJ746Q27MWOkp1PBMrfB9KaZ/FsarfaU=
Return-Path: <schwern [...] pobox.com>
Dkim-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=MAuLCbKeEuy6 x8HGEmy3L5bmu7w=; b=eQVhhnLRlaKxcMc10nxfcltf5xau5Do89QcwfWSXznGt 9l70/iZHSO3uTFT8hwlCm7rbG1mI1UOAMr3PoZaqSc0trKoyKuHxghMm9kji11gh OJro80GDc68mtWapiY3HnfTvsmmeG+C+xFa7EGREK9uA5jvQOgzY6VR7H81f4XA=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
X-RT-Mail-Extension: module-build
Date: Thu, 01 Dec 2011 12:42:42 -0800
X-Spam-Level:
To: bug-Module-Build [...] rt.cpan.org
X-Enigmail-Version: 1.3.3
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: 051F16FA-1C5D-11E1-A8AD-9DB42E706CDE-02258300!b-pb-sasl-quonix.pobox.com
From: Michael G Schwern <schwern [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-6895-1322772175-883.72867-0-0 [...] rt.cpan.org>
Content-Length: 1320
Download (untitled) / with headers
text/plain 1.2k
On 2011.12.1 12:19 PM, Ken Williams via RT wrote: Show quoted text
> So I do think it's appropriate for anything with an underscore, or > leading underscore, or whatever the convention is, not to be put into > 'provides' unless the user overrides that.
While I do agree that the user's needs are valid, I don't agree about the need of a heuristic. First, underscores are not the convention for unindexed namespaces. The convention for "CPAN don't index this package" is... package My::Name::Here; The PAUSE indexer doesn't see that and I suspect Module::Build won't see that either. No line-by-line scanner will. Second, we don't need a heuristic. The user can declare them with no_index. http://search.cpan.org/perldoc?CPAN::Meta::Spec#no_index Heuristics only work if there's a clear convention to apply which will be obvious to all. There's no clear convention here and nothing to tell the user that a special rule was silently applied. If there's a lot of private modules to be ignored, Module::Build could accept a regex or subroutine and generate the list for the user. no_index => { directory => qr{^secret}, package => qr{_}, } -- You are wicked and wrong to have broken inside and peeked at the implementation and then relied upon it. -- tchrist in <31832.969261130@chthon>
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6895-1322772175-883.72867-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-72867 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322747742-1292.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322755122-1340.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6893-1322762237-1828.72867-5-0 [...] rt.cpan.org> <CAOeq1c9dxbrc++u714aM6K60SEnABaHMPQdny1uL2GTb=PzYQQ [...] mail.gmail.com> <rt-3.8.HEAD-13645-1322770141-524.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-12654-1322770797-396.72867-5-0 [...] rt.cpan.org> <4ED7E6C2.6070008 [...] pobox.com> <rt-3.8.HEAD-6895-1322772175-883.72867-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6892-1322774171-1963.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 499
Download (untitled) / with headers
text/plain 499b
On Thu Dec 01 15:42:55 2011, schwern@pobox.com wrote: Show quoted text
> First, underscores are not the convention for unindexed namespaces. > The convention for "CPAN don't index this package" is... > > package > My::Name::Here;
Oops, I read part of this thread wrong. I thought PAUSE would also not index packages containing underscores, but it looks like it does. So the convention I thought existed doesn't actually exist. So I agree, there's no need to treat underscores any differently. -Ken
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6892-1322774171-1963.72867-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-72867 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322747742-1292.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6890-1322755122-1340.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6893-1322762237-1828.72867-5-0 [...] rt.cpan.org> <CAOeq1c9dxbrc++u714aM6K60SEnABaHMPQdny1uL2GTb=PzYQQ [...] mail.gmail.com> <rt-3.8.HEAD-13645-1322770141-524.72867-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-12654-1322770797-396.72867-5-0 [...] rt.cpan.org> <4ED7E6C2.6070008 [...] pobox.com> <rt-3.8.HEAD-6895-1322772175-883.72867-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6892-1322774171-1963.72867-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12654-1322822691-1571.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1008
Download (untitled) / with headers
text/plain 1008b
Thanks for looking into this. If nothing else, the behavior should be documented. Also, recommendations for "internal" module namespaces should be dicussed. I recall learning a long time ago that it was to prefix modules with "_".... I find it much more intuitive than using "MyCompany::" as a prefix (which is less useful when the company name is very long or a common word that is likely to clash with existing or future modules). --Rob On Thu Dec 01 16:16:11 2011, KWILLIAMS wrote: Show quoted text
> On Thu Dec 01 15:42:55 2011, schwern@pobox.com wrote:
> > First, underscores are not the convention for unindexed namespaces. > > The convention for "CPAN don't index this package" is... > > > > package > > My::Name::Here;
> > Oops, I read part of this thread wrong. I thought PAUSE would also not > index packages containing underscores, but it looks like it does. So > the convention I thought existed doesn't actually exist. > > So I agree, there's no need to treat underscores any differently.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12654-1322822691-1571.72867-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <CAOeq1c9dxbrc++u714aM6K60SEnABaHMPQdny1uL2GTb=PzYQQ [...] mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6895-1322832381-862.72867-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 538
Download (untitled) / with headers
text/plain 538b
On Fri Dec 02 05:44:51 2011, RRWO wrote: Show quoted text
> Also, recommendations for "internal" module namespaces should be > dicussed. I recall learning a long time ago that it was to prefix > modules with "_".... I find it much more intuitive than using > "MyCompany::" as a prefix (which is less useful when the company name is > very long or a common word that is likely to clash with existing or > future modules).
Those are two different things. The former is for things nobody is supposed to use. The latter is to avoid namespace clashes.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.