Re: New module: Text::Wrap::OO
Hi Joey, Joey Kelly writes: > You ought to put it in git, no doubt (and everything else you write). For sure. I'll release the git repository at the same time as the module on CPAN. When I said "eventually," I think I accidentally implied "in a long time," which is not what I meant. Asher -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me sprea= d! GPG fingerprint: 38F3 975C D173 4037 B397 8095 D4C9 C4FC 5460 8E68 signature.asc Description: PGP signature
Re: New module: Text::Wrap::OO
Hi Dan, Thanks for the quick reply! Dan Book writes: > It's a fine list for that purpose. You may also seek feedback on > https://perldoc.perl.org/perlcommunity#IRC or > https://www.reddit.com/r/perl/. Ok, thanks. > The name and design seem fine to me. Just beware providing so many > options for doing the same thing that you'll have to support them all > (common mistake of the "DWIM era" of CPAN), sometimes it is better to > keep things simple and only add alternative options once they are > useful. I didn't think about that. Perhaps I should only keep the object interface then. After all, people can write their own subroutines if they really need to. Thanks for the advice. > Also make sure you are aware that CPAN distributions must be packaged > a specific way. The first few sections of > https://metacpan.org/pod/Dist::Zilla::Starter go over this and some > modern options for authoring (you don't have to use Dist::Zilla unless > it fits your approach). http://tynovsky.github.io/cpan-tutorials/ also > lays out a quick guide to authoring with Minilla. Actually, I'm already using Dist::Zilla for my module. I also wrote a plugin bundle for Dist::Zilla and Pod::Weaver (Dist::Zilla::PluginBundle::Author::ASDAGO and Pod::Weaver::PluginBundle::Author::ASDAGO). I haven't released them yet, but I will at the same time as my module. Thanks, Asher -- Early to rise, early to bed, makes a man healthy, wealthy and dead. -- Terry Pratchett, "The Light Fantastic" GPG fingerprint: 38F3 975C D173 4037 B397 8095 D4C9 C4FC 5460 8E68 signature.asc Description: PGP signature
Re: New module: Text::Wrap::OO
On April 6, 2021 11:15:45 AM MST, Asher Gordon wrote:
>Hi everyone,
>
>I have just written my first Perl module (that I'm going to release).
>It
>is an object oriented interface to Text::Wrap. My question is, what do
>you think of the name? Is it a good name, descriptive enough? And do
>you
>have any other advice for releasing my first module?
>
>I don't currently have it released anywhere (I'll eventually have the
>git repository on sv.nongnu.org), and I'm not sure if an attached
>tarball would be appreciated (I can attach it if requested), but here's
>the SYNOPSIS so you can get an idea of what it does and how it works:
>
>SYNOPSIS
> Object oriented interface
> use Text::Wrap::OO;
>
> my $wrapper = Text::Wrap::OO->new(init_tab => "\t");
> $wrapper->columns(70);
> my $wrapped = $wrapper->wrap($text);
>
> Static method interface
> use Text::Wrap::OO;
>
> my $wrapped = Text::Wrap::OO->wrap(
> {
> init_tab=> "\t",
> columns => 70,
> }, $text,
> );
>
> Exported interface
> use Text::Wrap::OO 'wrap',
> wrap => { columns => 70, -as => 'wrap70' };
>
> my $wrapped = wrap {
> init_tab=> "\t",
> columns => 60,
> }, $text;
>
> my $wrapped_70 = wrap70 {
> huge => 'overflow',
> }, $text;
>
>Thanks in advance,
>Asher
>
>P.S. https://pause.perl.org/pause/query?ACTION=pause_namingmodules
>seems
>to indicate that this is a good list for this type of question. Sorry
>if
>I was mistaken.
You ought to put it in git, no doubt (and everything else you write).
--Joey Kelly
--
Sent from my Android phone, while driving.
Re: New module: Text::Wrap::OO
On Tue, Apr 6, 2021 at 2:19 PM Asher Gordon wrote:
> Hi everyone,
>
> I have just written my first Perl module (that I'm going to release). It
> is an object oriented interface to Text::Wrap. My question is, what do
> you think of the name? Is it a good name, descriptive enough? And do you
> have any other advice for releasing my first module?
>
> I don't currently have it released anywhere (I'll eventually have the
> git repository on sv.nongnu.org), and I'm not sure if an attached
> tarball would be appreciated (I can attach it if requested), but here's
> the SYNOPSIS so you can get an idea of what it does and how it works:
>
> SYNOPSIS
>Object oriented interface
>use Text::Wrap::OO;
>
>my $wrapper = Text::Wrap::OO->new(init_tab => "\t");
>$wrapper->columns(70);
>my $wrapped = $wrapper->wrap($text);
>
>Static method interface
>use Text::Wrap::OO;
>
>my $wrapped = Text::Wrap::OO->wrap(
>{
>init_tab=> "\t",
>columns => 70,
>}, $text,
>);
>
>Exported interface
>use Text::Wrap::OO 'wrap',
>wrap => { columns => 70, -as => 'wrap70' };
>
>my $wrapped = wrap {
>init_tab=> "\t",
>columns => 60,
>}, $text;
>
>my $wrapped_70 = wrap70 {
>huge => 'overflow',
>}, $text;
>
> Thanks in advance,
> Asher
>
> P.S. https://pause.perl.org/pause/query?ACTION=pause_namingmodules seems
> to indicate that this is a good list for this type of question. Sorry if
> I was mistaken.
>
> --
> I have no doubt that it is a part of the destiny of the human race,
> in its gradual improvement, to leave off eating animals.
> -- Thoreau
>
> I prefer to send and receive mail encrypted. Please send me your
> public key, and if you do not have my public key, please let me
> know. Thanks.
>
> GPG fingerprint: 38F3 975C D173 4037 B397 8095 D4C9 C4FC 5460 8E68
>
It's a fine list for that purpose. You may also seek feedback on
https://perldoc.perl.org/perlcommunity#IRC or https://www.reddit.com/r/perl/
.
The name and design seem fine to me. Just beware providing so many options
for doing the same thing that you'll have to support them all (common
mistake of the "DWIM era" of CPAN), sometimes it is better to keep things
simple and only add alternative options once they are useful.
Also make sure you are aware that CPAN distributions must be packaged a
specific way. The first few sections of
https://metacpan.org/pod/Dist::Zilla::Starter go over this and some modern
options for authoring (you don't have to use Dist::Zilla unless it fits
your approach). http://tynovsky.github.io/cpan-tutorials/ also lays out a
quick guide to authoring with Minilla.
-Dan
