FAQ
Hi,

I want to install a script into CPAN but I don't know what category to
place it in. Is there a web page that describes them? I looked at
http://cpan.org/scripts/index.html but it does not have a description of
the categories.

The script is called "sub" and it creates skeletons of sub's by parsing
an usage statement and applying it to a template. An usage statement is
not valid Perl but it makes sense. For examples:

$text | @text = trim( @text );

will create:

# --------------------------------------
# Name: trim
# Usage: $text = trim( @text );
# @text = trim( @text );
# Purpose: TBD
# Parameters: @text -- TBD
# Returns: $text -- TBD
# @text -- TBD
#
sub trim {
my @text = @_;
my $text = '';

return wantarray ? @text : $text;
}


and

\%options = $object->get_options( ; @option_names );

will create:

# --------------------------------------
# Name: get_options
# Usage: \%options = $object->get_options( ; @option_names );
# Purpose: TBD
# Parameters: @option_names -- TBD
# Returns: \%options -- TBD
#
sub get_options {
my $self = shift @_;
my @option_names = @_;
my $options = {};

return $options;
}


Can someone suggest a category for it?


--
Just my 0.00000002 million dollars worth,
Shawn

Programming is as much about organization and communication
as it is about coding.

Regardless of how small the crowd is, there is always one in
it who has to find out the hard way that the laws of physics
applies to them too.

Search Discussions

  • James E Keenan at Jul 21, 2009 at 10:34 pm

    On Jul 21, 2009, at 4:53 PM, Shawn H. Corey wrote:

    Hi,

    I want to install a script into CPAN but I don't know what category
    to place it in. Is there a web page that describes them? I looked
    at http://cpan.org/scripts/index.html but it does not have a
    description of the categories.

    The script is called "sub" and it creates skeletons of sub's by
    parsing an usage statement and applying it to a template. An usage
    statement is not valid Perl but it makes sense. For examples:
    I agree that there is no obvious category for your program at the
    'scripts' page on cpan.org -- but I think that's because that page is
    used very little and is of little use in distributing code. You'd be
    much better off posting it on perlmonks.org and requesting feedback
    on it there.

    That being said, you're going to catch a tremendous amount of flack
    for naming a program with a word that is reserved by Perl for its own
    use: sub.

    If you're a relative newcomer and want to get feedback on your Perl
    programs, I recommend perl-beginners at Yahoo Groups. I spent
    several years reading that list every day when I was starting. I
    believe there may also be a perl beginners list at perl.org.

    HTH

    Jim Keenan
  • Shawn H. Corey at Jul 21, 2009 at 11:02 pm

    James E Keenan wrote:
    I agree that there is no obvious category for your program at the
    'scripts' page on cpan.org -- but I think that's because that page is
    used very little and is of little use in distributing code. You'd be
    much better off posting it on perlmonks.org and requesting feedback on
    it there.
    Yeah, this list isn't dead.
    That being said, you're going to catch a tremendous amount of flack for
    naming a program with a word that is reserved by Perl for its own use:
    sub.
    I named it sub because it creates sub's. It's easy to remember.
    If you're a relative newcomer and want to get feedback on your Perl
    programs, I recommend perl-beginners at Yahoo Groups. I spent several
    years reading that list every day when I was starting. I believe there
    may also be a perl beginners list at perl.org.

    HTH

    Jim Keenan
    Yeah, I'm relatively new to Perl; I didn't starting programming in it
    until Perl 4. Perl 5 is all new to me :)

    I shall try your suggestion with perkmonks.


    --
    Just my 0.00000002 million dollars worth,
    Shawn

    Programming is as much about organization and communication
    as it is about coding.

    Regardless of how small the crowd is, there is always one in
    it who has to find out the hard way that the laws of physics
    apply to them too.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscripts @
categoriesperl
postedJul 21, '09 at 8:53p
activeJul 21, '09 at 11:02p
posts3
users2
websiteperl.org

2 users in discussion

Shawn H. Corey: 2 posts James E Keenan: 1 post

People

Translate

site design / logo © 2021 Grokbase