convert 1.1
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2405
Mail::Addressbook::Convert 1.1
Mail::Addressbook::Convert is a Perl module that can convert to and from many e-mail addressbooks. more>>
Mail::Addressbook::Convert is a Perl module that can convert to and from many e-mail addressbooks.
SYNOPSIS
These modules allow to to convert between the following e-mail addressbook formats
From To csv csv ( Note: MS Outlook. Outlook Express and many other mailers will export and import into this format) tsv tsv (tab-separated ascii, Outlook and OE also do these) pine pine ccMail Eudora Eudora Pegasus Pegasus Juno Lidf Ldif (Netscape 4 exports in this format ) Mailrc Spry
This distribution will convert email addressbooks between many common formats. Some examples are Pine, Eudora, Pegasus, csv.
The documentation here is general. For details on conversion, each module has pod documentation specific to its conversion
As an example
To use to convert between Pine and Eudora as an example, you would do the following
use Mail::Addressbook::Convert::Pine;
use Mail::Addressbook::Convert::Eudora;
my $Pine = new Mail::Addressbook::Convert::Pine();
my $Eudora = new Mail::Addressbook::Convert::Eudora();
my $PineInFile ="pineSample.txt"; # name of the file containing the Pine data
my $raIntermediate = $Pine->scan($PineInFile);
my $raEudora = $Eudora->output($raIntermediate); # reference to an array containing a Eudora addressbook
All modules follow this template except Pegasus. Pegasus stores its address books in multiple files. See the documentation in Pegasus.pm
<<lessSYNOPSIS
These modules allow to to convert between the following e-mail addressbook formats
From To csv csv ( Note: MS Outlook. Outlook Express and many other mailers will export and import into this format) tsv tsv (tab-separated ascii, Outlook and OE also do these) pine pine ccMail Eudora Eudora Pegasus Pegasus Juno Lidf Ldif (Netscape 4 exports in this format ) Mailrc Spry
This distribution will convert email addressbooks between many common formats. Some examples are Pine, Eudora, Pegasus, csv.
The documentation here is general. For details on conversion, each module has pod documentation specific to its conversion
As an example
To use to convert between Pine and Eudora as an example, you would do the following
use Mail::Addressbook::Convert::Pine;
use Mail::Addressbook::Convert::Eudora;
my $Pine = new Mail::Addressbook::Convert::Pine();
my $Eudora = new Mail::Addressbook::Convert::Eudora();
my $PineInFile ="pineSample.txt"; # name of the file containing the Pine data
my $raIntermediate = $Pine->scan($PineInFile);
my $raEudora = $Eudora->output($raIntermediate); # reference to an array containing a Eudora addressbook
All modules follow this template except Pegasus. Pegasus stores its address books in multiple files. See the documentation in Pegasus.pm
Download (0.030MB)
Added: 2006-08-02 License: Perl Artistic License Price:
1178 downloads
GD::Convert 2.12
GD::Convert is a Perl module with additional output formats for GD. more>>
GD::Convert is a Perl module with additional output formats for GD.
SYNOPSIS
use GD;
use GD::Convert qw(gif=gif_netpbm newFromGif=newFromGif_imagemagick wbmp);
# or:
require GD::Convert;
import GD::Convert;
...
$gd->ppm;
$gd->xpm;
$gd->gif;
$gd->wbmp;
...
$gd = GD::Image->newFromPpmData(...);
$gd = GD::Image->newFromGif(...);
This module provides additional output methods for the GD module: ppm, xpm, wbmp, gif_netpbm and gif_imagemagick, and also additional constructors: newFromPpm, newFromPpmData, newFromGif_netpbm, newFromGifData_netpbm, newFromGif_imagemagick, newFromGifData_imagemagick.
The new methods go into the GD namespace.
For convenience, it is possible to set shorter names for the gif, newFromGif and newFromGifData methods by providing one of the following strings in the import list:
gif=gif_netpbm
newFromGif=newFromGif_netpbm
newFromGifData=newFromGifData_netpbm
Use external commands from netpbm to load and create GIF images.
gif=gif_imagemagick
newFromGif=newFromGif_imagemagick
newFromGifData=newFromGifData_imagemagick
Use external commands from imagemagick to load and create GIF images.
gif=any
newFromGif=any
newFromGifData=any
Use any of the above methods to load and create GIF images.
wbmp
Create wbmp images. Only necessary for GD before version 1.26, but it does not hurt if it is included with newer GD versions.
The new methods and constructors:
$ppmdata = $image->ppm
Take a GD image and return a string with a PPM file as its content.
$xpmdata = $image->xpm
Take a GD image and return a string with a XPM file as its content.
$gifdata = $image->gif_netpbm([...])
Take a GD image and return a string with a GIF file as its content. The conversion will use the ppmtogif binary from netpbm. Make sure that ppmtogif is actually in your PATH. If you specify gif=gif_netpbm in the use line, then you can use the method name gif instead.
The gif_netpbm handles the optional parameter -transparencyhack. If set to a true value, a transparent GIF file will be produced. Note that this will not work if the transparent color occurs also as a normal color.
$gifdata = $image->gif_imagemagick
This is the same as gif_netpbm, instead it is using the convert program of ImageMagick.
$image = GD::Image->newFromPpm($file, [$truecolor])
Create a GD image from the named ppm file or filehandle reference. Only raw ppm files (signature P6) are supported.
$image = GD::Image->newFromPpmData($data, [$truecolor])
Create a GD image from the data string containing ppm data. Only raw ppm files are supported.
$image = GD::Image->newFromGif_netpbm($file, [$truecolor]);
Create a GD image from the named file or filehandle reference using external netpbm programs.
$image = GD::Image->newFromGifData_netpbm($file, [$truecolor]);
Create a GD image from the data string using external netpbm programs.
$image = GD::Image->newFromGif_imagemagick($file, [$truecolor]);
Create a GD image from the named file or filehandle reference using external ImageMagick programs.
$image = GD::Image->newFromGifData_imagemagick($file, [$truecolor]);
Create a GD image from the data string using external ImageMagick programs.
You can set the variable $GD::Convert::DEBUG to a true value to get some information about external commands used while converting.
<<lessSYNOPSIS
use GD;
use GD::Convert qw(gif=gif_netpbm newFromGif=newFromGif_imagemagick wbmp);
# or:
require GD::Convert;
import GD::Convert;
...
$gd->ppm;
$gd->xpm;
$gd->gif;
$gd->wbmp;
...
$gd = GD::Image->newFromPpmData(...);
$gd = GD::Image->newFromGif(...);
This module provides additional output methods for the GD module: ppm, xpm, wbmp, gif_netpbm and gif_imagemagick, and also additional constructors: newFromPpm, newFromPpmData, newFromGif_netpbm, newFromGifData_netpbm, newFromGif_imagemagick, newFromGifData_imagemagick.
The new methods go into the GD namespace.
For convenience, it is possible to set shorter names for the gif, newFromGif and newFromGifData methods by providing one of the following strings in the import list:
gif=gif_netpbm
newFromGif=newFromGif_netpbm
newFromGifData=newFromGifData_netpbm
Use external commands from netpbm to load and create GIF images.
gif=gif_imagemagick
newFromGif=newFromGif_imagemagick
newFromGifData=newFromGifData_imagemagick
Use external commands from imagemagick to load and create GIF images.
gif=any
newFromGif=any
newFromGifData=any
Use any of the above methods to load and create GIF images.
wbmp
Create wbmp images. Only necessary for GD before version 1.26, but it does not hurt if it is included with newer GD versions.
The new methods and constructors:
$ppmdata = $image->ppm
Take a GD image and return a string with a PPM file as its content.
$xpmdata = $image->xpm
Take a GD image and return a string with a XPM file as its content.
$gifdata = $image->gif_netpbm([...])
Take a GD image and return a string with a GIF file as its content. The conversion will use the ppmtogif binary from netpbm. Make sure that ppmtogif is actually in your PATH. If you specify gif=gif_netpbm in the use line, then you can use the method name gif instead.
The gif_netpbm handles the optional parameter -transparencyhack. If set to a true value, a transparent GIF file will be produced. Note that this will not work if the transparent color occurs also as a normal color.
$gifdata = $image->gif_imagemagick
This is the same as gif_netpbm, instead it is using the convert program of ImageMagick.
$image = GD::Image->newFromPpm($file, [$truecolor])
Create a GD image from the named ppm file or filehandle reference. Only raw ppm files (signature P6) are supported.
$image = GD::Image->newFromPpmData($data, [$truecolor])
Create a GD image from the data string containing ppm data. Only raw ppm files are supported.
$image = GD::Image->newFromGif_netpbm($file, [$truecolor]);
Create a GD image from the named file or filehandle reference using external netpbm programs.
$image = GD::Image->newFromGifData_netpbm($file, [$truecolor]);
Create a GD image from the data string using external netpbm programs.
$image = GD::Image->newFromGif_imagemagick($file, [$truecolor]);
Create a GD image from the named file or filehandle reference using external ImageMagick programs.
$image = GD::Image->newFromGifData_imagemagick($file, [$truecolor]);
Create a GD image from the data string using external ImageMagick programs.
You can set the variable $GD::Convert::DEBUG to a true value to get some information about external commands used while converting.
Download (0.010MB)
Added: 2006-08-10 License: GPL (GNU General Public License) Price:
1173 downloads
Convert::BER 1.3101
Convert::BER is a Perl module for ASN.1 Basic Encoding Rules. more>>
Convert::BER is a Perl module for ASN.1 Basic Encoding Rules.
SYNOPSIS
use Convert::BER;
$ber = new Convert::BER;
$ber->encode(
INTEGER => 1,
SEQUENCE => [
BOOLEAN => 0,
STRING => "Hello",
],
REAL => 3.7,
);
$ber->decode(
INTEGER => $i,
SEQUENCE => [
BOOLEAN => $b,
STRING => $s,
],
REAL => $r,
);
Convert::BER provides an OO interface to encoding and decoding data using the ASN.1 Basic Encoding Rules (BER), a platform independent way of encoding structured binary data together with the structure.
<<lessSYNOPSIS
use Convert::BER;
$ber = new Convert::BER;
$ber->encode(
INTEGER => 1,
SEQUENCE => [
BOOLEAN => 0,
STRING => "Hello",
],
REAL => 3.7,
);
$ber->decode(
INTEGER => $i,
SEQUENCE => [
BOOLEAN => $b,
STRING => $s,
],
REAL => $r,
);
Convert::BER provides an OO interface to encoding and decoding data using the ASN.1 Basic Encoding Rules (BER), a platform independent way of encoding structured binary data together with the structure.
Download (0.025MB)
Added: 2006-08-22 License: Perl Artistic License Price:
1171 downloads
Audio Convert 0.3.1.1
audio convert is a script to convert Wav, Ogg, MP3, MPC, FLAC, APE, or WMA files into Wav, Ogg, MP3, MPC, FLAC, or APE files. more>>
Audio Convert is a script to convert Wav, Ogg, MP3, MPC, FLAC, APE, or WMA files into Wav, Ogg, MP3, MPC, FLAC, or APE files.
It has an easy-to-use interface that makes it possible to fill in the tags for a few formats and choose the quality of compression.
The script was initially designed for the nautilus file browser, and can be easily installed into nautilus by copying it to the nautilus-scripts directory, at which point you can right click on the desired audio file(s) and choose "audio-convert" from the "scripts" menu.
The script is also known to work on rox or directly from a shell.
Enhancements:
- The installer was modified to create the directory it is supposed to create.
<<lessIt has an easy-to-use interface that makes it possible to fill in the tags for a few formats and choose the quality of compression.
The script was initially designed for the nautilus file browser, and can be easily installed into nautilus by copying it to the nautilus-scripts directory, at which point you can right click on the desired audio file(s) and choose "audio-convert" from the "scripts" menu.
The script is also known to work on rox or directly from a shell.
Enhancements:
- The installer was modified to create the directory it is supposed to create.
Download (0.010MB)
Added: 2005-11-12 License: GPL (GNU General Public License) Price:
1446 downloads
Convert::BinHex 1.119
Convert::BinHex can extract data from Macintosh BinHex files. more>>
Convert::BinHex can extract data from Macintosh BinHex files.
ALPHA WARNING: this code is currently in its Alpha release. Things may change drastically until the interface is hammered out: if you have suggestions or objections, please speak up now!
SYNOPSIS
Simple functions:
use Convert::BinHex qw(binhex_crc macbinary_crc);
# Compute HQX7-style CRC for data, pumping in old CRC if desired:
$crc = binhex_crc($data, $crc);
# Compute the MacBinary-II-style CRC for the data:
$crc = macbinary_crc($data, $crc);
Hex to bin, low-level interface. Conversion is actually done via an object ("Convert::BinHex::Hex2Bin") which keeps internal conversion state:
# Create and use a "translator" object:
my $H2B = Convert::BinHex->hex2bin; # get a converter object
while (< STDIN >) {
print $STDOUT $H2B->next($_); # convert some more input
}
print $STDOUT $H2B->done; # no more input: finish up
Hex to bin, OO interface. The following operations must be done in the order shown!
# Read data in piecemeal:
$HQX = Convert::BinHex->open(FH=>*STDIN) || die "open: $!";
$HQX->read_header; # read header info
@data = $HQX->read_data; # read in all the data
@rsrc = $HQX->read_resource; # read in all the resource
Bin to hex, low-level interface. Conversion is actually done via an object ("Convert::BinHex::Bin2Hex") which keeps internal conversion state:
# Create and use a "translator" object:
my $B2H = Convert::BinHex->bin2hex; # get a converter object
while (< STDIN >) {
print $STDOUT $B2H->next($_); # convert some more input
}
print $STDOUT $B2H->done; # no more input: finish up
Bin to hex, file interface. Yes, you can convert to BinHex as well as from it!
# Create new, empty object:
my $HQX = Convert::BinHex->new;
# Set header attributes:
$HQX->filename("logo.gif");
$HQX->type("GIFA");
$HQX->creator("CNVS");
# Give it the data and resource forks (either can be absent):
$HQX->data(Path => "/path/to/data"); # here, data is on disk
$HQX->resource(Data => $resourcefork); # here, resource is in core
# Output as a BinHex stream, complete with leading comment:
$HQX->encode(*STDOUT);
PLANNED!!!! Bin to hex, "CAP" interface. Thanks to Ken Lunde for suggesting this.
# Create new, empty object from CAP tree:
my $HQX = Convert::BinHex->from_cap("/path/to/root/file");
$HQX->encode(*STDOUT);
BinHex is a format used by Macintosh for transporting Mac files safely through electronic mail, as short-lined, 7-bit, semi-compressed data streams. Ths module provides a means of converting those data streams back into into binary data.
<<lessALPHA WARNING: this code is currently in its Alpha release. Things may change drastically until the interface is hammered out: if you have suggestions or objections, please speak up now!
SYNOPSIS
Simple functions:
use Convert::BinHex qw(binhex_crc macbinary_crc);
# Compute HQX7-style CRC for data, pumping in old CRC if desired:
$crc = binhex_crc($data, $crc);
# Compute the MacBinary-II-style CRC for the data:
$crc = macbinary_crc($data, $crc);
Hex to bin, low-level interface. Conversion is actually done via an object ("Convert::BinHex::Hex2Bin") which keeps internal conversion state:
# Create and use a "translator" object:
my $H2B = Convert::BinHex->hex2bin; # get a converter object
while (< STDIN >) {
print $STDOUT $H2B->next($_); # convert some more input
}
print $STDOUT $H2B->done; # no more input: finish up
Hex to bin, OO interface. The following operations must be done in the order shown!
# Read data in piecemeal:
$HQX = Convert::BinHex->open(FH=>*STDIN) || die "open: $!";
$HQX->read_header; # read header info
@data = $HQX->read_data; # read in all the data
@rsrc = $HQX->read_resource; # read in all the resource
Bin to hex, low-level interface. Conversion is actually done via an object ("Convert::BinHex::Bin2Hex") which keeps internal conversion state:
# Create and use a "translator" object:
my $B2H = Convert::BinHex->bin2hex; # get a converter object
while (< STDIN >) {
print $STDOUT $B2H->next($_); # convert some more input
}
print $STDOUT $B2H->done; # no more input: finish up
Bin to hex, file interface. Yes, you can convert to BinHex as well as from it!
# Create new, empty object:
my $HQX = Convert::BinHex->new;
# Set header attributes:
$HQX->filename("logo.gif");
$HQX->type("GIFA");
$HQX->creator("CNVS");
# Give it the data and resource forks (either can be absent):
$HQX->data(Path => "/path/to/data"); # here, data is on disk
$HQX->resource(Data => $resourcefork); # here, resource is in core
# Output as a BinHex stream, complete with leading comment:
$HQX->encode(*STDOUT);
PLANNED!!!! Bin to hex, "CAP" interface. Thanks to Ken Lunde for suggesting this.
# Create new, empty object from CAP tree:
my $HQX = Convert::BinHex->from_cap("/path/to/root/file");
$HQX->encode(*STDOUT);
BinHex is a format used by Macintosh for transporting Mac files safely through electronic mail, as short-lined, 7-bit, semi-compressed data streams. Ths module provides a means of converting those data streams back into into binary data.
Download (0.083MB)
Added: 2006-08-04 License: Perl Artistic License Price:
1234 downloads
ImageConverter 1.0
ImageConverter is able to convert one image type (example:gif) to another type (example:jpeg). more>>
ImageConverter is able to convert one image type (example:gif) to another type (example:jpeg).
ImageConverter application uses ImageMagick to conver the images!
<<lessImageConverter application uses ImageMagick to conver the images!
Download (MB)
Added: 2006-04-17 License: GPL (GNU General Public License) Price:
1368 downloads
Convert::UUlib 1.06
Convert::UUlib is a Perl interface to the uulib library (a.k.a. uudeview/uuenview). more>>
Convert::UUlib is a Perl interface to the uulib library (a.k.a. uudeview/uuenview).
SYNOPSIS
use Convert::UUlib :all;
# read all the files named on the commandline and decode them
# into the CURRENT directory. See below for a longer example.
LoadFile $_ for @ARGV;
for (my $i = 0; my $uu = GetFileListItem $i; $i++) {
if ($uu->state & FILE_OK) {
$uu->decode;
print $uu->filename, "n";
}
}
Read the file doc/library.pdf from the distribution for in-depth information about the C-library used in this interface, and the rest of this document and especially the non-trivial decoder program at the end.
<<lessSYNOPSIS
use Convert::UUlib :all;
# read all the files named on the commandline and decode them
# into the CURRENT directory. See below for a longer example.
LoadFile $_ for @ARGV;
for (my $i = 0; my $uu = GetFileListItem $i; $i++) {
if ($uu->state & FILE_OK) {
$uu->decode;
print $uu->filename, "n";
}
}
Read the file doc/library.pdf from the distribution for in-depth information about the C-library used in this interface, and the rest of this document and especially the non-trivial decoder program at the end.
Download (0.23MB)
Added: 2006-08-21 License: Perl Artistic License Price:
1159 downloads
Convert::UU 0.52
Convert::UU, uuencode, uudecode is a Perl module for uuencode and uudecode. more>>
Convert::UU is a Perl module for uuencode and uudecode.
SYNOPSIS
use Convert::UU qw(uudecode uuencode);
$encoded_string = uuencode($string,[$filename],[$mode]);
($string,$filename,$mode) = uudecode($string);
$string = uudecode($string); # in scalar context
uuencode() takes as the first argument a string that is to be uuencoded. Note, that it is the string that is encoded, not a filename. Alternatively a filehandle may be passed that must be opened for reading. It returns the uuencoded string including begin and end. Second and third argument are optional and specify filename and mode. If unspecified these default to "uuencode.uu" and 644.
uudecode() takes a string as argument which will be uudecoded. If the argument is a filehandle this handle will be read instead. If it is a reference to an ARRAY, the elements are treated like lines that form a string. Leading and trailing garbage will be ignored. The function returns the uudecoded string for the first begin/end pair. In array context it returns an array whose first element is the uudecoded string, the second is the filename and the third is the mode.
<<lessSYNOPSIS
use Convert::UU qw(uudecode uuencode);
$encoded_string = uuencode($string,[$filename],[$mode]);
($string,$filename,$mode) = uudecode($string);
$string = uudecode($string); # in scalar context
uuencode() takes as the first argument a string that is to be uuencoded. Note, that it is the string that is encoded, not a filename. Alternatively a filehandle may be passed that must be opened for reading. It returns the uuencoded string including begin and end. Second and third argument are optional and specify filename and mode. If unspecified these default to "uuencode.uu" and 644.
uudecode() takes a string as argument which will be uudecoded. If the argument is a filehandle this handle will be read instead. If it is a reference to an ARRAY, the elements are treated like lines that form a string. Leading and trailing garbage will be ignored. The function returns the uudecoded string for the first begin/end pair. In array context it returns an array whose first element is the uudecoded string, the second is the filename and the third is the mode.
Download (0.006MB)
Added: 2006-08-22 License: Perl Artistic License Price:
1161 downloads
Time::Convert 0.5
Time::Convert is a Perl interface to converting unix seconds to years, days, hours and minutes. more>>
Time::Convert is a Perl interface to converting unix seconds to years, days, hours and minutes.
SYNOPSIS
use Time::Convert;
my $convert = new Time::Convert;
EXAMPLE
use Time::Convert;
my $convert = new Time::Convert;
$REPLY = $convert->ConvertSecs(time);
print($REPLY);
<<lessSYNOPSIS
use Time::Convert;
my $convert = new Time::Convert;
EXAMPLE
use Time::Convert;
my $convert = new Time::Convert;
$REPLY = $convert->ConvertSecs(time);
print($REPLY);
Download (0.002MB)
Added: 2006-08-10 License: Perl Artistic License Price:
1172 downloads
Sman::Man::Convert 1.01
Sman::Man::Convert is a Perl module to convert manpages to XML for sman-update and sman. more>>
Sman::Man::Convert is a Perl module to convert manpages to XML for sman-update and sman.
SYNOPSIS
# this module is intended for internal use by sman-update
my $smanconfig = new Sman::Config();
$smanconfig->ReadDefaultConfigFile();
my $converter = new Sman::Man::Convert($smanconfig);
#$converter->ClearCache(); # if you wish
my ($type, $outputref) =
$converter->ConvertManfile($manfile);
Use MANCMD and COLCMD (see perldoc sman.conf) to convert the man pages from ASCII into XML.
<<lessSYNOPSIS
# this module is intended for internal use by sman-update
my $smanconfig = new Sman::Config();
$smanconfig->ReadDefaultConfigFile();
my $converter = new Sman::Man::Convert($smanconfig);
#$converter->ClearCache(); # if you wish
my ($type, $outputref) =
$converter->ConvertManfile($manfile);
Use MANCMD and COLCMD (see perldoc sman.conf) to convert the man pages from ASCII into XML.
Download (0.030MB)
Added: 2006-08-03 License: Perl Artistic License Price:
1177 downloads
Convert::Recode 1.04
Convert::Recode is a Perl module to make mapping functions between character sets. more>>
Convert::Recode is a Perl module to make mapping functions between character sets.
SYNOPSIS
use Convert::Recode qw(ebcdic_to_ascii);
while () {
print ebcdic_to_ascii($_);
}
The Convert::Recode module can provide mapping functions between character sets on demand. It depends on GNU recode to provide the raw mapping data, i.e. GNU recode must be installed first. The name of the mapping function is constructed by taking the names of the two charsets and joining them with the string "_to_". For example, if you want to convert between the "mac" and the "latin1" charsets, just import the mac_to_latin1() function.
If you prefix the function name with "strict_", any characters that cannot be mapped are removed during transformation. For instance, the strict_mac_to_latin1() function converts a string to latin1 and removes all mac characters that do not have a corresponding latin1 character.
Running the command recode -l should give you the list of available character sets.
<<lessSYNOPSIS
use Convert::Recode qw(ebcdic_to_ascii);
while () {
print ebcdic_to_ascii($_);
}
The Convert::Recode module can provide mapping functions between character sets on demand. It depends on GNU recode to provide the raw mapping data, i.e. GNU recode must be installed first. The name of the mapping function is constructed by taking the names of the two charsets and joining them with the string "_to_". For example, if you want to convert between the "mac" and the "latin1" charsets, just import the mac_to_latin1() function.
If you prefix the function name with "strict_", any characters that cannot be mapped are removed during transformation. For instance, the strict_mac_to_latin1() function converts a string to latin1 and removes all mac characters that do not have a corresponding latin1 character.
Running the command recode -l should give you the list of available character sets.
Download (0.003MB)
Added: 2006-08-12 License: Perl Artistic License Price:
1168 downloads
Convert::PEM 0.07
Convert::PEM is Perl module that read/write encrypted ASN.1 PEM files. more>>
Convert::PEM is Perl module that read/write encrypted ASN.1 PEM files.
SYNOPSIS
use Convert::PEM;
my $pem = Convert::PEM->new(
Name => "DSA PRIVATE KEY",
ASN => qq(
DSAPrivateKey SEQUENCE {
version INTEGER,
p INTEGER,
q INTEGER,
g INTEGER,
pub_key INTEGER,
priv_key INTEGER
}
));
my $pkey = $pem->read(
Filename => $keyfile,
Password => $pwd
);
$pem->write(
Content => $pkey,
Password => $pwd,
Filename => $keyfile
);
Convert::PEM reads and writes PEM files containing ASN.1-encoded objects. The files can optionally be encrypted using a symmetric cipher algorithm, such as 3DES. An unencrypted PEM file might look something like this:
-----BEGIN DH PARAMETERS-----
MB4CGQDUoLoCULb9LsYm5+/WN992xxbiLQlEuIsCAQM=
-----END DH PARAMETERS-----
The string beginning MB4C... is the Base64-encoded, ASN.1-encoded "object."
An encrypted file would have headers describing the type of encryption used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers (Proc-Type and DEK-Info) indicate information about the type of encryption used, and the string starting with AFAZ... is the Base64-encoded, encrypted, ASN.1-encoded contents of this "object."
The initialization vector (C814158661DC1449) is chosen randomly.
<<lessSYNOPSIS
use Convert::PEM;
my $pem = Convert::PEM->new(
Name => "DSA PRIVATE KEY",
ASN => qq(
DSAPrivateKey SEQUENCE {
version INTEGER,
p INTEGER,
q INTEGER,
g INTEGER,
pub_key INTEGER,
priv_key INTEGER
}
));
my $pkey = $pem->read(
Filename => $keyfile,
Password => $pwd
);
$pem->write(
Content => $pkey,
Password => $pwd,
Filename => $keyfile
);
Convert::PEM reads and writes PEM files containing ASN.1-encoded objects. The files can optionally be encrypted using a symmetric cipher algorithm, such as 3DES. An unencrypted PEM file might look something like this:
-----BEGIN DH PARAMETERS-----
MB4CGQDUoLoCULb9LsYm5+/WN992xxbiLQlEuIsCAQM=
-----END DH PARAMETERS-----
The string beginning MB4C... is the Base64-encoded, ASN.1-encoded "object."
An encrypted file would have headers describing the type of encryption used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers (Proc-Type and DEK-Info) indicate information about the type of encryption used, and the string starting with AFAZ... is the Base64-encoded, encrypted, ASN.1-encoded contents of this "object."
The initialization vector (C814158661DC1449) is chosen randomly.
Download (0.020MB)
Added: 2006-08-17 License: Perl Artistic License Price:
1169 downloads
Convert::Scalar 1.03
Convert::Scalar is a Perl module that can convert between different representations of perl scalars. more>>
Convert::Scalar is a Perl module that can convert between different representations of perl scalars.
SYNOPSIS
use Convert::Scalar;
This module exports various internal perl methods that change the internal representation or state of a perl scalar. All of these work in-place, that is, they modify their scalar argument. No functions are exported by default.
The following export tags exist:
:utf8 all functions with utf8 in their name
:taint all functions with taint in their name
:refcnt all functions with refcnt in their name
:ok all *ok-functions.
utf8 scalar[, mode]
Returns true when the given scalar is marked as utf8, false otherwise. If the optional mode argument is given, also forces the interpretation of the string to utf8 (mode true) or plain bytes (mode false). The actual (byte-) content is not changed. The return value always reflects the state before any modification is done.
This function is useful when you "import" utf8-data into perl, or when some external function (e.g. storing/retrieving from a database) removes the utf8-flag.
utf8_on scalar
Similar to utf8 scalar, 1, but additionally returns the scalar (the argument is still modified in-place).
utf8_off scalar
Similar to utf8 scalar, 0, but additionally returns the scalar (the argument is still modified in-place).
utf8_valid scalar [Perl 5.7]
Returns true if the bytes inside the scalar form a valid utf8 string, false otherwise (the check is independent of the actual encoding perl thinks the string is in).
utf8_upgrade scalar
Convert the string content of the scalar in-place to its UTF8-encoded form (and also returns it).
utf8_downgrade scalar[, fail_ok=0]
Attempt to convert the string content of the scalar from UTF8-encoded to ISO-8859-1. This may not be possible if the string contains characters that cannot be represented in a single byte; if this is the case, it leaves the scalar unchanged and either returns false or, if fail_ok is not true (the default), croaks.
utf8_encode scalar
Convert the string value of the scalar to UTF8-encoded, but then turn off the SvUTF8 flag so that it looks like bytes to perl again. (Might be removed in future versions).
utf8_length scalar
Returns the number of characters in the string, counting wide UTF8 characters as a single character, independent of wether the scalar is marked as containing bytes or mulitbyte characters.
unmagic scalar, type
Remove the specified magic from the scalar (DANGEROUS!).
weaken scalar
Weaken a reference. (See also WeakRef).
taint scalar
Taint the scalar.
tainted scalar
returns true when the scalar is tainted, false otherwise.
untaint scalar
Remove the tainted flag from the specified scalar.
grow scalar, newlen
Sets the memory area used for the scalar to the given length, if the current length is less than the new value. This does not affect the contents of the scalar, but is only useful to "pre-allocate" memory space if you know the scalar will grow. The return value is the modified scalar (the scalar is modified in-place).
refcnt scalar[, newrefcnt]
Returns the current reference count of the given scalar and optionally sets it to the given reference count.
refcnt_inc scalar
Increments the reference count of the given scalar inplace.
refcnt_dec scalar
Decrements the reference count of the given scalar inplace. Use weaken instead if you understand what this function is fore. Better yet: dont use this module in this case.
refcnt_rv scalar[, newrefcnt]
Works like refcnt, but dereferences the given reference first. This is useful to find the reference count of arrays or hashes, which cnanot be passed directly. Remember that taking a reference of some object increases its reference count, so the reference count used by the *_rv-functions tend to be one higher.
refcnt_inc_rv scalar
Works like refcnt_inc, but dereferences the given reference first.
refcnt_dec_rv scalar
Works like refcnt_dec, but dereferences the given reference first.
ok scalar
uok scalar
rok scalar
pok scalar
nok scalar
niok scalar
Calls SvOK, SvUOK, SvROK, SvPOK, SvNOK or SvNIOK on the given scalar, respectively.
<<lessSYNOPSIS
use Convert::Scalar;
This module exports various internal perl methods that change the internal representation or state of a perl scalar. All of these work in-place, that is, they modify their scalar argument. No functions are exported by default.
The following export tags exist:
:utf8 all functions with utf8 in their name
:taint all functions with taint in their name
:refcnt all functions with refcnt in their name
:ok all *ok-functions.
utf8 scalar[, mode]
Returns true when the given scalar is marked as utf8, false otherwise. If the optional mode argument is given, also forces the interpretation of the string to utf8 (mode true) or plain bytes (mode false). The actual (byte-) content is not changed. The return value always reflects the state before any modification is done.
This function is useful when you "import" utf8-data into perl, or when some external function (e.g. storing/retrieving from a database) removes the utf8-flag.
utf8_on scalar
Similar to utf8 scalar, 1, but additionally returns the scalar (the argument is still modified in-place).
utf8_off scalar
Similar to utf8 scalar, 0, but additionally returns the scalar (the argument is still modified in-place).
utf8_valid scalar [Perl 5.7]
Returns true if the bytes inside the scalar form a valid utf8 string, false otherwise (the check is independent of the actual encoding perl thinks the string is in).
utf8_upgrade scalar
Convert the string content of the scalar in-place to its UTF8-encoded form (and also returns it).
utf8_downgrade scalar[, fail_ok=0]
Attempt to convert the string content of the scalar from UTF8-encoded to ISO-8859-1. This may not be possible if the string contains characters that cannot be represented in a single byte; if this is the case, it leaves the scalar unchanged and either returns false or, if fail_ok is not true (the default), croaks.
utf8_encode scalar
Convert the string value of the scalar to UTF8-encoded, but then turn off the SvUTF8 flag so that it looks like bytes to perl again. (Might be removed in future versions).
utf8_length scalar
Returns the number of characters in the string, counting wide UTF8 characters as a single character, independent of wether the scalar is marked as containing bytes or mulitbyte characters.
unmagic scalar, type
Remove the specified magic from the scalar (DANGEROUS!).
weaken scalar
Weaken a reference. (See also WeakRef).
taint scalar
Taint the scalar.
tainted scalar
returns true when the scalar is tainted, false otherwise.
untaint scalar
Remove the tainted flag from the specified scalar.
grow scalar, newlen
Sets the memory area used for the scalar to the given length, if the current length is less than the new value. This does not affect the contents of the scalar, but is only useful to "pre-allocate" memory space if you know the scalar will grow. The return value is the modified scalar (the scalar is modified in-place).
refcnt scalar[, newrefcnt]
Returns the current reference count of the given scalar and optionally sets it to the given reference count.
refcnt_inc scalar
Increments the reference count of the given scalar inplace.
refcnt_dec scalar
Decrements the reference count of the given scalar inplace. Use weaken instead if you understand what this function is fore. Better yet: dont use this module in this case.
refcnt_rv scalar[, newrefcnt]
Works like refcnt, but dereferences the given reference first. This is useful to find the reference count of arrays or hashes, which cnanot be passed directly. Remember that taking a reference of some object increases its reference count, so the reference count used by the *_rv-functions tend to be one higher.
refcnt_inc_rv scalar
Works like refcnt_inc, but dereferences the given reference first.
refcnt_dec_rv scalar
Works like refcnt_dec, but dereferences the given reference first.
ok scalar
uok scalar
rok scalar
pok scalar
nok scalar
niok scalar
Calls SvOK, SvUOK, SvROK, SvPOK, SvNOK or SvNIOK on the given scalar, respectively.
Download (0.006MB)
Added: 2006-08-02 License: Perl Artistic License Price:
1178 downloads
Convert::Bencode 1.03
Convert::Bencode are functions for converting to/from bencoded strings. more>>
Convert::Bencode are functions for converting to/from bencoded strings.
SYNOPSIS
use Convert::Bencode qw(bencode bdecode);
my $string = "d4:ainti12345e3:key5:value4:type4:teste";
my $hashref = bdecode($string);
foreach my $key (keys(%{$hashref})) {
print "Key: $key, Value: ${$hashref}{$key}n";
}
my $encoded_string = bencode($hashref);
print $encoded_string."n";
This module provides two functions, bencode and bdecode, which encode and decode bencoded strings respectivly.
<<lessSYNOPSIS
use Convert::Bencode qw(bencode bdecode);
my $string = "d4:ainti12345e3:key5:value4:type4:teste";
my $hashref = bdecode($string);
foreach my $key (keys(%{$hashref})) {
print "Key: $key, Value: ${$hashref}{$key}n";
}
my $encoded_string = bencode($hashref);
print $encoded_string."n";
This module provides two functions, bencode and bdecode, which encode and decode bencoded strings respectivly.
Download (0.010MB)
Added: 2006-08-02 License: Perl Artistic License Price:
1181 downloads
Convert::CharMap 0.01
Convert::CharMap is a Perl module that can conversion between Unicode Character Maps. more>>
Convert::CharMap is a Perl module that can conversion between Unicode Character Maps.
SYNOPSIS
use Convert::CharMap;
my $map = Convert::CharMap->load(CharMapML => test.xml);
$map->save(UCM => test.ucm);
This module transforms between unicode character map formats, using an in-memory representation of CharMapML as the intermediate format.
Currently is supports the CharMapML, YAML and UCM (write-only) backends; ENC, Iconv and other maps are also planned.
<<lessSYNOPSIS
use Convert::CharMap;
my $map = Convert::CharMap->load(CharMapML => test.xml);
$map->save(UCM => test.ucm);
This module transforms between unicode character map formats, using an in-memory representation of CharMapML as the intermediate format.
Currently is supports the CharMapML, YAML and UCM (write-only) backends; ENC, Iconv and other maps are also planned.
Download (0.004MB)
Added: 2006-08-18 License: Perl Artistic License Price:
1164 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above convert 1.1 search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed