How to find old module that's no longer on CPAN

Discussion in 'Perl Misc' started by David Filmer, Sep 26, 2011.

  1. David Filmer

    David Filmer Guest

    I have a program from another machine - it uses the module
    Convert::ASCII::String, originally obtained from CPAN.

    This module no longer shows up in search.cpan.org. I have a feeling
    it might still live somewhere on CPAN under the author's name, but I
    don't know the author.

    How can I find this old module?

    Thanks!
    David Filmer, Sep 26, 2011
    #1
    1. Advertising

  2. David Filmer

    Uri Guttman Guest

    >>>>> "DF" == David Filmer <> writes:

    DF> I have a program from another machine - it uses the module
    DF> Convert::ASCII::String, originally obtained from CPAN.

    DF> This module no longer shows up in search.cpan.org. I have a feeling
    DF> it might still live somewhere on CPAN under the author's name, but I
    DF> don't know the author.

    DF> How can I find this old module?

    hi david,

    can you tell what the module did? are you sure it was on cpan and not
    private to the program author? google shows nothing like that name
    anywhere. cpan has various ascii convert modules including some in Acme
    but not by that name. if you post some functions it exports maybe we can
    find a replacement module for it.

    uri

    --
    Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com --
    ------------ Perl Developer Recruiting and Placement Services -------------
    ----- Perl Code Review, Architecture, Development, Training, Support -------
    Uri Guttman, Sep 26, 2011
    #2
    1. Advertising

  3. David Filmer <> writes:

    > This module no longer shows up in search.cpan.org. I have a feeling
    > it might still live somewhere on CPAN under the author's name, but I
    > don't know the author.


    If the module did originate on CPAN and you can find the author, then
    you might be able to find it on backpan.perl.org. But unless you know
    the name of the author it might be easier to just reimplement the needed
    features.

    //Makholm
    Peter Makholm, Sep 26, 2011
    #3
  4. David Filmer

    Jon Du Kim Guest

    Based on some ancient web page
    http://lascouts.net:8457/cgi-bin/man?mansearchword=Convert::ASCII::String&mansection=3&lang=en
    and then googling for the exported symbols it seems the best I can come
    up with is some dead links to rpm packaged versions of the module. Sorry. :(

    On 9/25/11 8:52 PM, David Filmer wrote:
    > I have a program from another machine - it uses the module
    > Convert::ASCII::String, originally obtained from CPAN.
    >
    > This module no longer shows up in search.cpan.org. I have a feeling
    > it might still live somewhere on CPAN under the author's name, but I
    > don't know the author.
    >
    > How can I find this old module?
    >
    > Thanks!
    Jon Du Kim, Sep 27, 2011
    #4
  5. David Filmer

    David Filmer Guest

    On Sep 25, 8:20 pm, "Uri Guttman" <> wrote:
    > can you tell what the module did? are you sure it was on cpan and not
    > private to the program author? google shows nothing like that name
    > anywhere. cpan has various ascii convert modules including some in Acme
    > but not by that name.


    I managed to gain access to the original system and the original
    module. It is a trivial module - it surely came from CPAN at one time
    (though I also see Google references to it in Acme namespace). I
    copied the (trivial) module to my new system and it works fine (of
    course).

    This situation, however, begs the question of how to find
    "obsolete" (though fully functional) CPAN modules that are used by
    legacy programs running on newer systems. I'm not sure who decides
    that a particular module is "obsolete." I have encountered this same
    situation with Tools::SQL, which I have been able to locate on CPAN by
    author (http://backpan.perl.org/authors/id/K/KA/KANE) - this is a
    convenience module for DBI stuff. This particular module has been
    supplanted by DBIx::Simple, but DBIx::Simple is not a drop-in
    replacement for Tools::SQL.

    My question was really more general in nature - how does someone
    locate a CPAN module that no longer is displayed in search.cpan.org
    but may be needed by a legacy program which is running under a newer
    platform?

    FWIW, here is the complete Convert::ASCII::String module. The author
    is not mentioned in the perldocs:

    package Convert::ASCII::String;

    $VERSION = '0.32';
    @EXPORT_OK = qw(str2asc asc2str);

    use strict 'vars';
    use vars qw($Sep);
    use base qw(Exporter);
    use Carp 'croak';

    =head1 NAME

    Convert::ASCII::String - Convert character strings to ASCII

    =head1 SYNOPSIS

    use Convert::ASCII::String qw(str2asc asc2str);

    $transform = 'Qui vult dare parva non debet magna rogare.';

    str2asc($transform, '.');

    81.117.105.32.118.117.108.116.32.100.
    97.114.101.32.112.97.114.118.97.32.110.
    111.110.32.100.101.98.101.116.32.109.97.
    103.110.97.32.114.111.103.97.114.101.46

    asc2str($transform, '.');

    Qui vult dare parva non debet magna rogare.

    =head1 DESCRIPTION

    Convert::ASCII::String basically converts strings to ASCII.
    It applies the internal functions C<pack> & C<unpack>. Most time these
    functions prove
    to be sufficient if data has to be converted and remains within
    memory.

    C<pack> & C<unpack> rely upon arrays to convert data and not without
    reason though.
    Preserving multiple ASCII codes in a single string conveys some
    difficulty since
    its hard to distinguish where from and where to each ASCII code
    ranges.

    This module solves this problem by allowing inserting a item separator
    between each ASCII code (preferably a non-numeric value).

    =head2 Appropriate usage

    In most cases the usage of this module will prove to be inappropriate.
    If data will
    remain within memory, then array ASCII conversion using C<pack> &
    C<unpack> is appropriate and
    presumably faster than using C<Convert::ASCII::String>.

    So, when to use then?

    Whenever data has to be converted to ASCII and has to be stored on a
    disk or other mediums
    where it will freed from the array it was previously kept in. C<pack>
    & C<unpack> will not be
    able to convert an array to character if not each single ASCII code
    takes up its own index within
    the array; thus string transformation with an item separator.

    =head1 FUNCTIONS

    =head2 str2asc

    Converts a character string to ASCII inserting a separator between
    each ASCII code.

    The separator is optional.

    str2asc($str, '.');

    or

    str2asc($str);

    Beware, second option will not allow back converting from ASCII.

    =cut

    sub str2asc {
    my($str, $sep) = @_;
    $sep ||= $Sep || '';
    croak 'usage: str2asc($str)' unless $str;
    return join $sep, unpack 'C*', $str;
    }

    =head2 asc2str

    And vice versa.

    asc2str($asc, '.');

    =cut

    sub asc2str {
    my($asc, $sep) = @_;
    $sep ||= $Sep;
    croak 'usage: asc2str($asc, $sep)' unless $asc && $sep;
    croak 'Separator mismatch' unless $asc =~ /\Q$sep/i;
    return pack 'C*', split /\Q$sep/, $asc;
    }

    1;
    __END__

    =head2 OPTIONS

    The separator may alternatively be set by

    $Convert::ASCII::String::Sep = '.';

    Function delivery becomes then superfluous.

    =head1 EXPORT

    C<str2asc(), asc2str()> are exportable.

    =cut
    David Filmer, Sep 27, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    369
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    177
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    263
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    917
    SVCitian
    Oct 22, 2010
  5. David Filmer

    How do I find an old Perl module on CPAN?

    David Filmer, May 6, 2012, in forum: Perl Misc
    Replies:
    1
    Views:
    574
    brian d foy
    May 6, 2012
Loading...

Share This Page