develooper Front page | perl.module-authors | Postings from April 2021

Re: New module: Text::Wrap::OO

Thread Previous | Thread Next
From:
Joey Kelly
Date:
April 6, 2021 20:01
Subject:
Re: New module: Text::Wrap::OO
Message ID:
AD1EC3E8-7EEC-44EE-A4FA-A405FC2E584B@joeykelly.net
On April 6, 2021 11:15:45 AM MST, Asher Gordon <AsDaGo@posteo.net> 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.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About