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

D

David Filmer

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!
 
U

Uri Guttman

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
 
P

Peter Makholm

David Filmer said:
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
 
D

David Filmer

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top