Обсуждение: perl namespace for postgres specific modules?

Поиск
Список
Период
Сортировка

perl namespace for postgres specific modules?

От
"Andrew Hammond"
Дата:
I need to write a perl module which will parse a .pgpass file into a
reasonable data-structure in memory. I may extend it later to go in the
other direction (given a populated datastructure, write a .pgpass).

The first question that came to mind is what namespace should I put
this under? Is there any precedent for perl modules intended to support
postgresql administration? If not, I suggest

PostgreSQL::pgpass

Thoughts?

Drew



Re: perl namespace for postgres specific modules?

От
"Ian Barwick"
Дата:
11 Aug 2006 15:57:42 -0700, Andrew Hammond <andrew.george.hammond@gmail.com>:
> I need to write a perl module which will parse a .pgpass file into a
> reasonable data-structure in memory. I may extend it later to go in the
> other direction (given a populated datastructure, write a .pgpass).
>
> The first question that came to mind is what namespace should I put
> this under? Is there any precedent for perl modules intended to support
> postgresql administration? If not, I suggest
>
> PostgreSQL::pgpass

PostgreSQL sounds like a logical choice. However CPAN - which has
product-specific namespaces such as DB2, MySQL, Msql and Oracle, has
"Postgres" rather than "PostgreSQL"  (though there are only two
modules in it, one of which dates from 1998,
see http://cpan.org/modules/by-module/Postgres/ ).


Ian Barwick


Re: perl namespace for postgres specific modules?

От
andrew@dunslane.net
Дата:
Andrew Hammond wrote:
> I need to write a perl module which will parse a .pgpass file into a
> reasonable data-structure in memory. I may extend it later to go in the
> other direction (given a populated datastructure, write a .pgpass).
>
> The first question that came to mind is what namespace should I put
> this under? Is there any precedent for perl modules intended to support
> postgresql administration? If not, I suggest
>
> PostgreSQL::pgpass
>


IIRC it is conventional to begin each section of a perl namespace with an
upper case char. That's what I tend to do at any rate. (Of course,
namespaces aren't really hierarchical, but it's a nice illusion.)

Other than that it seems reasonable.

cheers

andrew