Groups | Search | Server Info | Login | Register


Groups > perl.module-authors > #3401

Re: Name space for XML Invoice Parser

Newsgroups perl.module-authors
Path csiph.com!fu-berlin.de!bofh.it!nntp.perl.org
Xref csiph.com perl.module-authors:3401
Return-Path <johannes@btw23.de>
Mailing-List contact module-authors-help@perl.org; run by ezmlm
Delivered-To mailing list module-authors@perl.org
Received (qmail 6403 invoked from network); 11 Jun 2024 15:01:57 -0000
Received from xx1.develooper.com (147.75.38.233) by x6.develooper.com with SMTP; 11 Jun 2024 15:01:57 -0000
Received from inbound-egress-5.mailchannels.net (inbound-egress-5.mailchannels.net [199.10.31.237]) by xx1.develooper.com (Postfix) with ESMTP id B8EC57C1A2 for <module-authors@perl.org>; Tue, 11 Jun 2024 08:01:56 -0700 (PDT)
Received from inbound-trex-0 (unknown [127.0.0.6]) by postfix-inbound-v2-3.inbound.mailchannels.net (Postfix) with ESMTP id DD625422B0 for <module-authors@perl.org>; Tue, 11 Jun 2024 15:01:55 +0000 (UTC)
ARC-Seal i=1; s=arc-2022; d=mailchannels.net; t=1718118114; a=rsa-sha256; cv=none; b=pkKE2Z+0J0CXGU7W+E5zsCpzZ9GGqtFSnbgroRdQDnr+b2jAH9EgmFF6pQyVBWXsTChEar w1S50Zdn9LfuK9QLGoCPgKGVs+rKXCJir1s4WNPZmmjZ2rsYmPlKXuHyuwLK6UuiCVCCOO zgWRz/TYPAL2SPApokw1Pio5/40V13po/MvKJVJwVvAJyehxyLp/Coh0Mqu4kkQ4Ku6wSQ 4mHURXy9zEXzsfBfuZWz5LtDEF0JSZT9qLAyLCl6gIEPlYq2d/SQL9vWEaLQuRznrWv0ua 3PkFI+wzWSWFackNLHzhIVRppVoNOtFgCFPt3LX9w3PoI7Pw03zdXT2yRokWLw==
ARC-Message-Signature i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1718118114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5hWkZWPa71JbBghIj26OOB8TpL+NCqcFWtw4FV0rGCs=; b=C9U/RhQ0b2q0i+XABez+N1P82bo098V+sk9bWq5tx/yq+7s803oEJ/Tg4nSTlbaunjFxAm tWUiObfBgygQqNqZvFfufNWgGdzE7eEk7ee0UZUw/uyZAoDCgYbd/rRqioS1MPRPfZSZXD 0kx19ifXwDPewlcJwSOGrgUn102FJZa44CwwX8vJL/1EibVIF64AVuC8desSpcmgz0J89f 6qbEaU92N2nwSFIPb9cVFyjXCB8En8WvlKuUPmqx6kXCgTOS2zV7Q647fLr1R8qxm46hcw JyN1vTBN/rpLN8PoknJxl6RTPmp3UNxD+EjXU7Yqdw04PC45ObxoXenkmnTU+w==
ARC-Authentication-Results i=1; inbound-rspamd-84485b4694-8rtlx; none
X-Message-ID N2CzMjF1WP1tK9gsangEO30c
Received from vsrv57603.customer.vlinux.de (vsrv57603.customer.vlinux.de [31.15.64.93]) by 100.113.249.80 (trex/6.10.3); Tue, 11 Jun 2024 15:01:55 +0000
Authentication-Results inbound.mailchannels.net; spf=pass smtp.mailfrom=johannes@btw23.de; dkim=none; dmarc=none; arc=none
Received-SPF pass (dmarc-service-84689968d8-h55qv: domain of btw23.de designates 31.15.64.93 as permitted sender) client-ip=31.15.64.93; envelope-from=johannes@btw23.de; helo=vsrv57603.customer.vlinux.de;
Date Tue, 11 Jun 2024 17:01:52 +0200
To module-authors@perl.org
Subject Re: Name space for XML Invoice Parser
Message-ID <20240611150152.GD1698@btw23.de> (permalink)
References <20240611132010.GC1698@btw23.de> <31d53c57-7bee-4f91-be43-a898016ecf33@Spark>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <31d53c57-7bee-4f91-be43-a898016ecf33@Spark>
X-Operating-System Linux 5.4.0-182-generic
X-PGP-Key 0xCBACC90B
Approved news@nntp.perl.org
From johannes@btw23.de (Johannes Grassler)

Show key headers only | View raw


Hello,

Thanks for your response!

On Tue, Jun 11, 2024 at 03:28:58PM +0100, Neil Bowers wrote:
> I think the namespace XML::Invoice is fine.

Ok, that's a start.

> I thought it would be helpful to mention a namespace / permissions
> constraint you should be aware of, for CPAN.  I'm guessing that your
> parser produces objects that are instances of XML::Invoice?

Not quite. It produces instances of XML::Invoice::Parser because I may
add another package XML::Invoice::Generator in the future.

> I would call the CPAN distribution XML-Invoice, and assume it would
> contain at least two classes: XML::Invoice and XML::Invoice::Parser?

The top level class is XML::Invoice::Parser with various subclasses such
as XML::Invoice::Parser::CrossIndustryInvoice or
XML::Invoice::Parser::UBL. There is no XML::Invoice class right now.

> And a later release might also include XML::Invoice::Generator.

Yes.

> When you release something to CPAN (by uploading it to PAUSE), you
> must have a module with a name that corresponds to the distribution
> name.

Yes...right now I have a module XML::Invoice::Parser (residing in
lib/XML/Invoice/Parser.pm) in there. The distribution is called
XML-Invoice-Parser.

> So if you release a distribution XML-Invoice, it has to contain a
> module XML::Invoice, and either (a) there are currently no indexing
> permissions on XML:::Invoice (in which case you'll be granted the
> first-come indexing permission), or (b) you already have an indexing
> permission (either first-come or co-maint) on XML::Invoice.

So this is where I am probably running into the constraint you
mention:

> We occasionally see problems where someone releases a distribution
> with a name like Image-Formats which contains Image::Formats::PNG,
> Image::Formats::JPEG, etc, but no Image::Formats module.

I do indeed not have a lib/XML/Invoice.pm right now:

  https://github.com/jgrassler/XML-Invoice-Parser/tree/master/lib/XML/Invoice

> This constraint was added to PAUSE so that people couldn't jump in and
> snatch the first-come indexing permission on a module name that
> clearly should be associated with some existing module names.

...and this is kind of what I am planning on doing right now. So do you
think it would be ok to snatch the XML::Invoice name space with bare
lib/XML/Invoice.pm that merely declares the package XML::Invoice?

> The other option is that you could call your parser
> XML::InvoiceParser, and have XML::InvoiceParser::Invoice for the
> invoice objects. But I think that's clunky, and leaves XML::Invoice
> unclaimed, for someone else to bag.

Yeah, that's clunky indeed. I'd rather avoid that.

So just to make sure I understand: if I released the module as-is with
XML::Invoice::Parser being the top level module, I'd leave XML::Invoice
for someone else to bag, right?

Cheers,

Johannes

-- 
Phone:   +49 176 24 24 20 83             WWW: http://btw23.de/johannes/

GPG Key fingerprint: 2A3F 5FEC D752 944C BD9C  B25A 651A B200 1434 C358

Back to perl.module-authors | Previous | NextPrevious in thread | Find similar


Thread

Name space for XML Invoice Parser johannes@btw23.de (Johannes Grassler) - 2024-06-11 15:20 +0200
  Re: Name space for XML Invoice Parser johannes@btw23.de (Johannes Grassler) - 2024-06-11 17:01 +0200

csiph-web