String::Random replacement String::RegEx (Also Request pragma 'use caution')

2001-05-07 Thread Yves Orton

Greetings.

Recently I have been working on a number of utilities for regular 
expressions, one of which is similer to String::Random.  I have taken the 
liberty of using the namespaces specified, but would be interested to know 
if they present a problem, or if their functionality has been covered 
elsewhere.  All of the packages are set up in OO style.
(Apologies if I have missed out on some protocol issue here, this my first 
post.)
Also a request: Could we have a pragma that can be used to replace the dual 
use of use strict and use warnings?  It would be cool if

use caution;

was an alias for

use strict;
use warnings;

Also the name seemed apropriate. :-)

---

String::RegEx::.
-- This is the umbrella class that I have used for my classes.  I thought 
about extending String::Random, but the functionality I have been working on 
covers much more than String::Random does.
It provides a single interface into the other classes I have been writing, 
so as to enable me to avoid typing long use lists.
Major functions:
String::RegEx::generate()
Takes a regular expression and generates random data based on it.  Supports 
basically all perl regular expressions that dont involve backreferences and 
zero-width assertions, which are currently a work in progress.
An example would be:
my $regex=String::RegEx->new();
warn $regex->generate('(?:(perl|PERL|[Pp]erl) is (?:very ){1,5} cool!\n)+');
Produces (Edited for size...):
PERL is very very  cool!
Perl is very very very very  cool!
PERL is very  cool!
PERL is very very very very  cool!

String::RegEx::gen_allcases()
An experimental routine that will generate a set of strings, one per 'part' 
of the regex.  The idea being that if you are using a rgex as a input 
cleaner or the like you use this to see if your pattern would match some 
string that you didnt expect.  Work In Progress.

String::RegEx::pretty()
Takes a regular expression and outputs it indented and the like...
Example using previous regex. Whitespace in the original is convert to 
escape sequences.  The pretty version should run under the x modifier just 
as the original...
(?:
(
perl
|
PERL
|
[Pp]erl
)
\x20is\x20
(?:very\x20){3,5}
\x20cool!
\n
)+
String::RegEx::build_from_list()
Takes a list of words and generate a regular expression that will match 
those words. Inspired by J Friedl and his book.  Unfortunately I forgot my 
laptop network cable today so no example avail :-(

String::RegEx::make_trans()
Automate the eval'ing of runtime tr///.
(Editor says more detail:  Takes a string containing alphabet and target 
alphabet and returns a subref that will do the translation. For 
convienience)

String::RegEx::build_longest_matcher
Kind of a special purpose tool, takes a list like build_from_list and
returns a sub ref that will match the words in the list LONGEST first.

String::RegEx::build_list_matcher
Returns a subroutine reference that will match the words in the list.  Has 
options to determine if it will make one huge regex or a bunch of smaller 
ones that are applied in turn.



--
I really would like to release this stuff to CPAN and would appreciate any 
help or advice regarding this that may had.

DeMerphQ





_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Registration

2001-05-07 Thread Shaun Dawson


  Greetings,

  I have been coordinating with Graham Barr in order to take over
maintenence of the Net::SNPP module from him.  The following is my
information as per the registration page:

Name:  Shaun Dawson
E-mail: [EMAIL PROTECTED]
Home Page: none
Preferred user-ID: SHAUN
Description: I'm planning on taking over maintenece of the Net::SNPP
module from Graham Barr.  Initially, I will be fixing some rfc compliance
problems as well as addressing some bug fixes.

thanks, 
  Shaun Dawson




Module submission SNMP::NPAdmin

2001-05-07 Thread Perl Authors Upload Server


The following module was proposed for inclusion in the Module List:

  modid:   SNMP::NPAdmin
  DSLIP:   adpO?
  description: Perl API to query printers via SNMP.
  userid:  BOZZIO (Robert Lehr)
  chapterid:5 (Networking_Devices_IPC)
  communities:
comp.lang.perl.modules,comp.lang.perl.moderated,comp.lang.perl.misc

  similar:
none

  rationale:

The name of the module is derived from the original 'npadmin'
program. This module is a perl port of that program which is written
C++. Since it uses SNMP, it makes sense to include it with other
SNMP modules.

  enteredby:   BOZZIO (Robert Lehr)
  enteredon:   Mon May  7 18:44:00 2001 GMT

The resulting entry would be:

SNMP::
::NPAdmin adpO ?Perl API to query 
:printers via SNMP.


Thanks for registering,
The Pause Team

PS: The following links are only valid for module list maintainers:

Registration form with editing capabilities:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=5300_0ab718f563cc9225&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=5300_0ab718f563cc9225&SUBMIT_pause99_add_mod_insertit=1



User update for STEPHEN

2001-05-07 Thread Perl Authors Upload Server

(This Mail was generated by the server
  https://pause.kbx.de/pause/authenquery;ACTION=edit_cred
automatically)

Record update in the PAUSE users database:

 userid: [STEPHEN]
   fullname: [Stephen Nelson]
  asciiname: []
  email: [[EMAIL PROTECTED]] was [[EMAIL PROTECTED]]
   homepage: [http://www.perlmonks.org/index.pl?node=stephen] was []
cpan_mail_alias: [publ]


Data were entered by STEPHEN (Stephen Nelson).
Please check if they are correct.

Thanks,
The Pause



Math::Random::Mersenne?

2001-05-07 Thread Abhijit Menon-Sen

I am writing a Perl module which uses the Mersenne Twister to generate
random numbers.

Does anyone have suggestions for naming the module? I am currently in
favour of Math::Random::Mersenne, but I could easily be persuaded to
change my mind (I don't like the Math::FooRandom convention, however).

If anyone is interested, the Mersenne Twister is described at
http://www.math.keio.ac.jp/~matumoto/emt.html>.

- ams



Module update for File::Rsync

2001-05-07 Thread Perl Authors Upload Server

Record update in the PAUSE modules database:

   modid: [File::Rsync]
   statd: [b]
   stats: [d]
   statl: [p]
   stati: [O]
   statp: [p] was [?]
 description: [Copy efficiently over the net and locally]
  userid: [LEAKIN]
   chapterid: [10]
mlstatus: [list]

Data entered by Lee Eakin (LEAKIN).
Please check if they are correct.

The Pause