[Israel.pm] new module for CPAN: Getopt::Long::String

Levenglick Dov-RM07994 Dov at freescale.com
Sun Jan 29 13:39:27 PST 2006

A friend asked me whether there is a sting parser that works like a command line operator (Getopt::...) and when I couldn’t find one on CPAN I wrote this module. 
Please give me your input since I want to load it to CPAN. The Pod (not copied here entirely) DESCRIPTION describes this as:
The Getopt::Long::String module uses Getopt::Long in order to provide parsing abilities for command strings (as opposed to command lines). This proves useful when your script is a wrapper for other scripts or programs and you have options that are not passed in @ARGV.

package Getopt::Long::String;

use 5.004;
use Exporter;
use Getopt::Long;
use strict;

use vars qw(@ISA @EXPORT @EXPORT_OK);
$VERSION        =  0.0;

@ISA = qw(Exporter);
    # Init immediately so their contents can be used in the 'use vars' below.
    @EXPORT      = qw(&GetOptions);

# User visible variables.
use vars @EXPORT, @EXPORT_OK;

sub GetOptions {
	my @_ARGV = @ARGV;
	@ARGV = split /\s+/, shift;
	my $rc = &Getopt::Long::GetOptions;
	@ARGV = @_ARGV;
	return $rc;

Best Regards,
Dov Levenglick
DSP SoC System and Applications Engineer,
Network and Computing Systems Group
Freescale Semiconductor Israel
Tel. +972-9-952-2804
The information contained in this email is classified as:
[ ] General Business Information
[ ] Freescale Internal Use Only
[ ] Freescale Confidential Propriety
[x] Personal Memorandum

More information about the Perl mailing list