|
Posted by Mumia W. (reading news) on December 6, 2006, 10:23 am
Please log in for more thread options
On 12/05/2006 10:41 PM, Uri Guttman wrote:
writes:
>
> MW(n> I think a good place for me to put my future modules on CPAN is into
> MW(n> the Marquis:: namespace--which currently does not exist.
>
> MW(n> What do the rest of you think of this idea?
>
> if this is a personal set of random modules, i would say no. top level
> namespaces should be used for larger namespaces. why do you want this
> name? what kind of modules and are they related? does marquis have a
> technical connection here or is it just a name you like?
>
> uri
>
It's just a name I like. Underneath Marquis:: would be a hierarchy of
namespaces for the modules I've written such as Marquis::Math and
Marquis::Sort.
I don't want to create more namespace pollution on CPAN, but I do want
to keep my module hierarchy separate from the others.
The first module I intend to submit is Marquis::Sort::KeyExtract :
> NAME
> Marquis::Sort::KeyExtract - Sort using a user-specified key extractor
>
> SYNOPSIS
> use Marquis::Sort::KeyExtract;
>
> my %months = (
> January => 1,
> February => 2,
> March => 3,
> April => 4,
> May => 5,
> );
>
> my @array = (
> 'District conferences will happen in =February (20-21)',
> 'Coat sales are in =January.',
> 'In =May, we meet with the directors.',
> '=March will see new matrices form.',
> 'Taxes are to be paid in =April.',
> );
>
> my $sorted = sort_keys {
> code => sub { s/=(\w+)/$1/ && $months },
> }, \@array;
>
> print "$_\n" for (@$sorted);
> [...]
http://home.earthlink.net/~mumia.w.18.spam/perl/KeyExtract.pod http://home.earthlink.net/~mumia.w.18.spam/perl/KeyExtract.pm
--
paduille.4060.mumia.w@earthlink.net
|