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

New module: Text::Wrap::OO

Thread Next
Asher Gordon
April 6, 2021 18:19
New module: Text::Wrap::OO
Message ID:
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, 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:

   Object oriented interface
           use Text::Wrap::OO;

           my $wrapper = Text::Wrap::OO->new(init_tab => "\t");
           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,

P.S. 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

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About