[ANN] Getopt-Declare 1.12 (gem/zip) and GGEnv (gem/zip)

G

gga

Getopt-Declare
--------------
There's a new bug fix release of Getopt-Declare, the port of Perl's
module by the same name.
This is a simple command parser using regexes where the help
documentation *is* the parser.
This version fixes some casting bug with private types and improves the
performance of parsing isolated flags a little.

GGEnv
-----
This is a simple for manipulation of environment variables that deals
with paths, using all of ruby's array functionality.
It should work properly across different platforms.

When loaded, it creates a module called Env.

Within it, it defines methods for [] and []=, so that you can do the
following:


Env.check_directories = false # turn off verification that
# directories exist (default: true)
path = Env['PATH']

path << "C:/newpath" # As path is modified, so
# is ENV['PATH']

path.delete_if { |x| x =~ /maya/ } # remove all paths that have maya

path.unshift ["C:/", "E:/bin"] # add these paths at start

Env['PATH'] = path[0,2] + path[4,6] # concat two slices

path.check_directories # check existance of directories
# for this variable only (unlike
# Env.check_directories = true)
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top