[Perl-unix-users] Re: Crypt::CBC

2006-04-10 Thread Martin Moss
/~lds/Crypt-CBC-2.12/ > > --Ian > > > On 4/10/06, Martin Moss > <[EMAIL PROTECTED]> wrote: > > All, > > > > I had some code which ran the old version of > > Crypt::CBC (2.12). > > > > Using these headers to create the object:- > > >

[Perl-unix-users] Crypt::CBC

2006-04-10 Thread Martin Moss
All, I had some code which ran the old version of Crypt::CBC (2.12). Using these headers to create the object:- my $cipher = new Crypt::CBC($ENCRYPTION_KEY,'Blowfish'); I've now built a new machine. Copied the database values (encrpypted using the above) onto the new machine DB using mysqldump

Re: [Perl-unix-users] Timing Out a Hanging function...how?

2005-07-28 Thread Martin Moss
Hi Arijit, As far as I'm aware SIGnals are the only generic mechanism you can use to jump out of code from any point of execution... So without knowing the contents of the subroutine you're running it's not easy to suggest a way for it to work. Perhaps you could post that subroutine? Is it doin

Re: [Perl-unix-users] XML::Simple - no element found at line 1, column 0, byte -1 at .......5.8.6/sun4-solaris/XML/Parser.pm line 186

2005-04-26 Thread Martin Moss
I've tried this with the latest version of XML::Simple and still the same error.. --- Martin Moss <[EMAIL PROTECTED]> wrote: > All, > > Since an upgrade of perl, some legacy code which > uses > XML::Simple has broken. > > This replicates the problem... >

[Perl-unix-users] XML::Simple - no element found at line 1, column 0, byte -1 at .......5.8.6/sun4-solaris/XML/Parser.pm line 186

2005-04-26 Thread Martin Moss
All, Since an upgrade of perl, some legacy code which uses XML::Simple has broken. This replicates the problem... my $xml=' '; my $contents = eval {XMLin($xml)}; $xml is not utf8 encoded (Checked with Encode::is_utf8) and when I run I get this error:- no element found at line 1, column 0, by

RE: [Perl-unix-users] XML::LibXML and UTF8 after perl upgrade

2005-04-20 Thread Martin Moss
I have no control over the documents we're receiving... I wanted to do something at this level:- my $libxml = XML::LibXML->new(); $libxml->encoding('ISO-8859-1'); Marty --- "Thomas, Mark - BLS CTR" <[EMAIL PROTECTED]> wrote: > > We use XML::LibXML in our code, which is in turn > used to >

[Perl-unix-users] XML::LibXML and UTF8 after perl upgrade

2005-04-20 Thread Martin Moss
All. We use XML::LibXML in our code, which is in turn used to parse the sent and received XML between our backend and front end webservers... Since we upgraded to perl 5.8.5 from 5.6.1 all our processes which read the XML and then input that data into ORACLE fail because the character encoding o

Re: [Perl-unix-users] dereferencing hash of hashes

2005-04-04 Thread Martin Moss
print "my hash value is '".$INST{DEV}->{dbhost}."'\n"; --- [EMAIL PROTECTED] wrote: > With this new structure, how would I dereference the > hash to return the text value instead of the hash > reference? > > use strict; > > my %INST= ( > DEV => { >fullname=> "DEVELOPMENT", >

Re: [Perl-unix-users] hash of hashes

2005-04-04 Thread Martin Moss
--- [EMAIL PROTECTED] wrote: > Martin, thanks for the response. Yes there are > multiple servers and I tried to simplify the code > since I wasn't providing a full script. This can > also help me minimize hard coding throughout the > script. Avoiding hard coding - always a good thing... :-) Whe

Re: [Perl-unix-users] hash of hashes

2005-04-04 Thread Martin Moss
I think this is what you're trying to do But I'm not sure why? I'd only do this if you are expecting to have multiple configs for dbhost, e.g. devdb1, devdb2, devdb3... otherwise I'm not sure why you'd break down the structure this much... DEV => { fullname=> "DEVELOPMENT",

Re: [Perl-unix-users] Search for a line and print the next 5 from a file

2005-01-31 Thread Martin Moss
Hi Craig, You need to use a counter. my $count =0; $count++; You will need to also check the counter on each loop iteration using 'if' 'else' and 'last' to exit the loop.. my $count=0; if ($count > 4) { last } else { $count++; } there's several ways to do this Here is one.. Incidentally, un

Re: [Perl-unix-users] whether I can design a whole system only with perl

2004-11-30 Thread Martin Moss
> Yes... CGI.pm would be a good place to start: > http://search.cpan.org/~lds/CGI.pm-3.05/CGI.pm I disagree. IMHO If you have C++ skills, you should bypass CGI and head straight on to mod_perl using "method handlers". These are Object oriented classes that handle web requests. Marty

Re: [Perl-unix-users] perl -v and $] Give different versions?

2004-10-22 Thread Martin Moss
8002 above it. > > I guess, it's correct. don't know why there is 00 > padding, but remove the zeros and I get 5.82 > > Yours would be 5.85 > > > --- Martin Moss <[EMAIL PROTECTED]> wrote: > > > Is this normal? > > > > perl -e'pri

[Perl-unix-users] perl -v and $] Give different versions?

2004-10-22 Thread Martin Moss
Is this normal? perl -e'print $]."\n";system ("perl -v");' 5.008005 This is perl, v5.8.5 built for i686-linux ... Marty ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.mess

[Perl-unix-users] Can't multiply inherit %FIELDS

2004-10-21 Thread Martin Moss
All, I've inherited some old code, and after moving it to a perl 5.8.5 environment from a perl 5.6.1 environment, I'm getting the following compilation error "Can't multiply inherit %FIELDS". Googling hasn't really helped me out much, I can't see any fields being declared twice in the inheritance

Re: [Perl-unix-users] Checking for input, perl 5.6.1 on Solaris 9, sparc...

2004-10-12 Thread Martin Moss
If you can decide at command line time which type of input to use, e.g. using | or a file, then why not write your script to use GetOpts::Std Then you can use the -w as usual, and create a new switche (-f <$filename> for file) and no switch for STDIN. Then in your script you can simply check for t

Re: [Perl-unix-users] $self->$method doesn't work in 5.004

2004-09-14 Thread Martin Moss
solved it, in 5.004 you must specify the brackets - $self->$tag(); Marty --- Martin Moss <[EMAIL PROTECTED]> wrote: > All, > > I've got code thats being ported to a 5.004 (don't > ask!!) environment. > It works fine in 5.6, but I'm getting compila

[Perl-unix-users] $self->$method doesn't work in 5.004

2004-09-14 Thread Martin Moss
All, I've got code thats being ported to a 5.004 (don't ask!!) environment. It works fine in 5.6, but I'm getting compilation errors on 5.004 The line is this:- $self->$method_name; Is this valid syntax in 5.004? If not, any ideas on what to use instead? Regards Marty

[Perl-unix-users] Apache::DBI and Autocommit

2004-09-08 Thread Martin Moss
All, I'm trying to understand the Apache::DBI mechanism which caches and returns $dbh handles. My concern is that Apache DBI uses the connection options, like AutoCommit=>1 as part of it's caching 'key' mechanism. Thus would I be right in thinking that if I create a $dbh with AutoCommit=>1, this

Re: AW: [Perl-unix-users] Searching the entire string

2004-08-31 Thread Martin Moss
you could slurp the whoel file into one string and then search that. my $text; { local( $/ ) ; # Makes the entire file contents be read in one go, by changing what perl recognises as the line break char. see docs.. open (NEWFILE,"<$file") or die "Cannot open file '$file'";

[Perl-unix-users] convert £1,000,000 to £1m

2004-08-27 Thread Martin Moss
All, I need to do some number formatting, so I can shorten some rather large number strings. 1000,000,000 would become 1000m Does anybody know of a cpan module to do this. I had a look but couldn't find anything which did this. Marty

Re: [Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-27 Thread Martin Moss
urrently there aren't any show stopping taint issues. Hope this helps, Marty --- $Bill Luebkert <[EMAIL PROTECTED]> wrote: > Martin Moss wrote: > > > Hey Bill, thanks for your input, but no, I was > simply > > meaning that the string of perl I was trying to >

Re: [Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-26 Thread Martin Moss
> > The format of the output hash I wish to write is:- > > > > $hash= { > > 'key' => { > > 'original_value' > > =>$original_value', > > 'new_value' => > '$original_value', > > > > 'files' => [ > >

RE: [Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-26 Thread Martin Moss
Cheers James, Couldn't see the wood for the trees! It works great. Marty --- "vega, james" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: > [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] > On > > Behalf Of MA

[Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-26 Thread MARTIN MOSS
All, Hope everyone's having a pleasant day! I have a really urgent problem which I just can't seem to resolve. I have a data structure, which I want to write out to a file. The file I'd like to write would actually be a perl file which I can 'require' at a later date, after it's been manually ed

[Perl-unix-users] Constants issue/bug?

2003-09-10 Thread Martin Moss
All, I have found a curious issue with Constant Arrays. In my code I have this:- use constant PARENT_MENUS=>( #'Admin::Entity', ); and a subroutine:- sub parent_menus { my $self=shift; my $class=ref($self)||$self; my @menu=(); eval { @menu=$class->PARENT_MENUS; }

[Perl-unix-users] testing if a class constant is defined e.g. an optional constant?

2003-06-17 Thread Martin Moss
All, I have a simple problem, and hopefully hteres a simple solution, or perhaps I'm just barking mad. package myclass::A; use constant CONSTANT_ITEM=>'1'; package myclass::B; #no constant defined Outside of these two classes, I was wondering if it possible to do a check which tells me if a

Re: [Perl-unix-users] URGENT: Scan a directory and ftp if there are files

2003-06-09 Thread Martin Moss
Rather than using crontab, which is pretty much a pull method, why not use a perl daemon process - to use push? my $error=0; while ($error <1) { sleep 5;#or more just make sure you have a sleep in there #&readdir #&ftp files #&delete files #if (some error) { $

Re: [Perl-unix-users] Sorting Flat list of Module Names into Tree structure

2003-06-05 Thread Martin Moss
Earth to Brain!! Sorry I think I temporarily forgot the 'sort' function, Marty - Original Message - From: "Martin Moss" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, June 04, 2003 9:04 PM Subject: [Perl-unix-us

[Perl-unix-users] Sorting Flat list of Module Names into Tree structure

2003-06-05 Thread Martin Moss
Hi All, Wondering if anybody has an 'efficient' Hat on today? I Have a Hash who's Key's are all 'Module Names'. e.g. Foo=>1 Foo::Bar=>1 Foo::Bar::Poo=>1 Foo::Beer=>1 Foo::Beer::Nuts=>1 Foo::Beer::Nuts::Hmmm=>1 Foo::Bar::AgainHmmm=>1 What I want to do is to turn this hash into a Hierarchical Has

Re: [Perl-unix-users] memory issues

2003-04-02 Thread Martin Moss
[EMAIL PROTECTED]>; "Perl-Unix-Users EE-mail"" <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 5:37 PM Subject: Re: [Perl-unix-users] memory issues > From: "Martin Moss" <[EMAIL PROTECTED]> > To: "Perl-Win32-Users \(E-m

[Perl-unix-users] memory issues

2003-04-02 Thread Martin Moss
Title: Secure FTP All,   I was wondering if I could get clarification on something. I have a class object called $x.   What I want to do is pass this $x into objects $y & $z, and store it internally Thus:-   $y->{x}=$x; $z->{x}=$x;   This Is ok, and shouldn't cause any problems. However what

[Perl-unix-users] mysql ping on DBI

2003-03-18 Thread Martin Moss
All,   I have a problem in that I want to check if a DBI connection is still active. For this I have heard you can use ping. But From the documents I've found I see that ping is always set to return true for DBD::mysql. But DBD::Oracle has a ping routine defined which does a valid check. The

[Perl-unix-users] REUSED ADDRESS in Data::dumper

2003-02-26 Thread Martin Moss
All, When I dump a hash structure using 'x' on the perl debugger it looks like this:- 0 HASH(0x8658db4) '_load' => HASH(0x8ad6b00) 'PROCESSING' => 1 'STRUC' => HASH(0x8b56f94) -> REUSED_ADDRESS I am curious as to what REUSED_ADDRESS means? I am concerne

Re: [Perl-unix-users] Perl and UNix

2003-01-21 Thread Martin Moss
Whilst Net::Telnet is a groovy thing, Telnet isn't as secure as ssh. I haven't had any use of the Net::SSH stuff out there, but perhaps it would be a consideration, Regards Marty - Original Message - From: "Peter Eisengrein" <[EMAIL PROTECTED]> To: "'Poon, Kelvin (Infomart)'" <[EMAIL PROT

Re: [Perl-unix-users] listing subroutines defined locally in a class

2003-01-10 Thread Martin Moss
t;[EMAIL PROTECTED]> To: "Martin Moss" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 10, 2003 7:09 PM Subject: Re: [Perl-unix-users] listing subroutines defined locally in a class > take me off the list > > On Fri, 10

[Perl-unix-users] listing subroutines defined locally in a class

2003-01-10 Thread Martin Moss
All,   I want to be able to take a class and in it's 'new' subroutine do a check to ensure that each class has been given configuration information for each subroutine it has defined locally within that class. The problem I have is that I don't know how to differentiate between methods create

Re: [Perl-unix-users] Help: Daemon Status

2002-11-18 Thread Martin Moss
Title: RE: [Perl-unix-users] Help: Daemon Status apologies, I cut and pasted my code from something I'd already written, and the LOCKFILE bit is irrelevant.   Marty - Original Message - From: Martin Moss To: Mundell, R. (Ronald) ; '$Bill Luebkert' Cc: [

Re: [Perl-unix-users] Help: Daemon Status

2002-11-18 Thread Martin Moss
Title: RE: [Perl-unix-users] Help: Daemon Status Is it a general purpose process, or a custom process, e.g. will any of us here have heard of it.   Does this process write log files? Does it generate SNMP trap messages, Does the process try to communicate with anything else?   At the end of th

[Perl-unix-users] Re: Daemon Status

2002-11-18 Thread Martin Moss
Are you able to write the daemon as well? Or are you talking about writing a perl script to monitor an already existing daemon?   You really need to give out more details to allow us to give you an answer,   Regards   Marty - Original Message - From: Mundell, R. (Ronald)

[Perl-unix-users] strange behaviour of mod_perl

2002-09-05 Thread Martin Moss
All I am at a loss. Possibly it's 2am and I can't see the wood for the trees, but this really baffles me, in fact it is starting to annoy the heck outta me. Below is a snippet of code, from a Multiplexer I have written to handle URL's on the fly based upon database entires loaded in a module. The

Re: [Perl-unix-users] Erroneous EOF? REPOSTS???????

2002-08-30 Thread Martin Moss
All, Is anybody else getting reposts of my messages? I wonder if BT internet is going mad, Sorry, Marty - Original Message - From: "Martin Moss" <[EMAIL PROTECTED]> To: "Mark Breslauer" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED

[Perl-unix-users] Illicit unsubscriptions attempts?

2002-08-26 Thread Martin Moss
All, Today I received unsubscription emails from activestate from all my subscribed mailing lists. I just wondered if anybody else has had these in the past. Wondered if it was a glitch or if somebody is playing silly beggars, Regards Marty ___ Perl-

[Perl-unix-users] Re: $dbh drivername - solved $dbh->{Driver}->{Name};

2002-08-25 Thread Martin Moss
Google came up trumps eventually, my $driver=dbh->{Driver}->{Name}; Regards Marty - Original Message - From: "Martin Moss" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, August 25, 2002 5:24 PM Subject: $dbh drivern

[Perl-unix-users] $dbh drivername

2002-08-25 Thread Martin Moss
All, I've been hunting through the docs but not found anything useful. What I want to do is find out what the DriverName is for a $dbh connection. e.g. the $driver that DBI used to create the $dbh connection. ideally a method like this is what I'm after:- my $database_driver=$dbh->driver_name();

Re: [Perl-unix-users] Erroneous EOF?

2002-08-16 Thread Martin Moss
contains the character which is causing this problem. Or you could open the file as a binary fiile and use seek to navigate around it. Marty - Original Message - From: "Mark Breslauer" <[EMAIL PROTECTED]> To: "'Martin Moss'" <[EMAIL PROTECTED]>; &qu

Re: [Perl-unix-users] Erroneous EOF?

2002-08-16 Thread Martin Moss
How big is the log file? Have you exceeded the maximum size limit for a file? Marty - Original Message - From: "Mark Breslauer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "Mark Breslauer" <[EMAIL PROTECTED]> Sent: Friday, August 16, 2002 3:16 PM Subject: [Perl-un

Re: [Perl-unix-users] structuring languge dependent code

2002-08-15 Thread Martin Moss
> The only issue I have is I want to pass it the language locale on the fly? > Is this possible? DOH RTFM! Tired need slp. Cheers all, Marty ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mai

Re: [Perl-unix-users] structuring languge dependent code

2002-08-15 Thread Martin Moss
Thats absolutely the problem I was trying to solve, and a great solution. It doesn't look like there'd be issues with using it under perl 5.6? The only issue I have is I want to pass it the language locale on the fly? Is this possible? Thanks Randy, you get the gold star award, Kind regards Mar

[Perl-unix-users] structuring languge dependent code

2002-08-15 Thread Martin Moss
All, Does anybody have any suggestion how the Directory structuring of Modules. For instance I would like to support 3 languages. Therefore I want 3 different versions of the same module, but each one providing error messages and output in a specific language. so perhaps:- MyName::SubName1::F

[Perl-unix-users] Cookies tamper detection & Unique user detection

2002-08-14 Thread Martin Moss
Hi all, Long time no see:-) How are your significant others (wife, kids, girlfriends, pet goldfish)? Anyway down to business. Is there a method to check if a cookie has been tampered with? I'd thought about encrypting my values, but then the encrypted values can be copied into another cookie. I

Re: [Perl-unix-users] ^M characters

2002-06-07 Thread Martin Moss
recopy your file in ascii mode, This will remove the ^M. other wise the character you are looking for is a single character not '^' + 'M' you can tell this in vi by scrolling your cursor across it, you'll note the cursor moves two spaces. Can't remember what the unix keyboard command is to produ

RE: [Perl-unix-users] compiling perl scripts into EXE and then using the exe through apache

2002-06-06 Thread Martin Moss
then > using the exe through apache > > > > > http://httpd.apache.org/docs/howto/cgi.html > > There shouldn't be a problem as long as Apache is > configure to > > AddHandler cgi-script exe # for those pesty exe files > > > > --- Martin Moss <

RE: [Perl-unix-users] compiling perl scripts into EXE and then using the exe through apache

2002-06-06 Thread Martin Moss
> > modperl module? > > > > --- parvez <[EMAIL PROTECTED]> wrote: > > > Hi, > > > did u try using perlcc taht does it on > > > Unix/Linux: > > > USAGE is: > > > perlcc > > > /usr/bin/perlcc: Usage: > > > /usr/

[Perl-unix-users] compiling perl scripts into EXE and then using the exe through apache

2002-06-06 Thread Martin Moss
All, I want to precompile a perl script into an exe, and then use those exe's through apache as if they were normal .cgi .pl scripts. Can this be done, and if so how? Regards Marty ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: ht

RE: [Perl-unix-users] ^M characters

2002-04-24 Thread Martin Moss
The ^M also occurs if you ftp an ascii file using Binary method.. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Craig B. Nakata > Sent: Wednesday 24 April 2002 06:24 > To: 'Nagesh Reddy'; [EMAIL PROTECTED] > Subject: RE: [Perl-unix-users] ^M

RE: [Perl-unix-users] Hard Total amount of Forks

2002-04-10 Thread Martin Moss
Thanks Guys, It looks like I need SIGCHLD & a little bit of waitpid, Regards Marty > -Original Message- > From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] > Sent: Wednesday 10 April 2002 13:59 > To: Martin Moss > Cc: Perl-Unix-Users > Subject: Re: [Perl-unix-users

RE: [Perl-unix-users] Re: Hard Total amount of Forks

2002-04-10 Thread Martin Moss
Ahhh, sorry I didn't say, this would be on a Linux system. Marty > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > tripix > Sent: Wednesday 10 April 2002 12:58 > To: Martin Moss; Perl-Win32-Users (E-mail) > Cc: Perl-U

[Perl-unix-users] Hard Total amount of Forks

2002-04-10 Thread Martin Moss
All, I wish to add forking to a script I wrote. However I wish to ensure that only a configurable number of 'children' are created. forking is no problem, Queuing up things to be forked I can do, However is there an easy way to create a hard total, I was thinking the only way is to have each fo

RE: [Perl-unix-users] Automatic ftp download script

2002-03-11 Thread Martin Moss
compare the timestamps of the file. do an ftp 'ls -l' and record the timestamps. do a significant pause, maybe 3 seconds and then check again. if the timestamps match the file has probably (sorry it may hav bust) been uploaded. Regards Marty > -Original Message- > From: [EMAIL PROTECTE

RE: [Perl-unix-users] strict help needed !!!!

2002-03-05 Thread Martin Moss
I've included the fixes below. But basically when you refer to $date{index} you are really talking about the hashkey 'index' of hash '%date'. So at the beginning you should declare your hashes, you declared them as strings. e.g. my %date; # this is a hash not my $date; # this is a string #%

RE: [Perl-unix-users] Joining Databases

2002-02-18 Thread Martin Moss
taType ,$colStartPos ,$colEndPos ,$colLength > ,$colDataType > ,$colDateFmt ,$colNumFmt ); > > #Bind the variables to the sql statement. > $sth->bind_columns( \($tagName ,$dataType ,$colStartPos ,$colEndPos > ,$colLength ,$colDataType ,$colDateFmt ,$colNumFmt )); > > AND S

[Perl-unix-users] Joining Databases

2002-02-18 Thread Martin Moss
Daft question, Is it possible to join databases without making two calls. I.e. can the join be done within SQL, not using 2 $db references? Not sure which databases yet, but probably mysql, oracle, postgreSQL. Regards Marty ___ Perl-Unix-Users maili

[Perl-unix-users] How to Create A CPAN MIrror

2001-03-29 Thread Martin Moss
All, As I'm trying to create system wide level platform (over 100 machines) I need to be able to create my own internal CPAN mirror. But one which I can selectively update from CPAN as an when new modules exist. It would act as a way of ensuring all machines configured on my network get their CP

CPAN::SHell->expand

2001-03-21 Thread Martin Moss
All When using CPAN::Shell->expand within a perl script to install modules directly off CPAN, is there a way to force the install to 'follow' prerequisite Modules? Regards Marty ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.Acti

RE: [Perl-unix-users] memory usage of perl processes

2001-03-21 Thread Martin Moss
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > [EMAIL PROTECTED] > Sent: Wednesday 21 March 2001 16:30 > To: [EMAIL PROTECTED] > Subject: RE: [Perl-unix-users] memory usage of perl processes > > > > > > >I guess you could use 'top' in a unix wind

RE: [Perl-unix-users] Checking if a module is installed

2001-03-21 Thread Martin Moss
$obj->install } } Hmm Perhaps a little bit more patience is needed today:-) Marty > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Martin Moss > Sent: Wednesday 21 March 2001 16:20 > To: [EMAIL PROTECTED] > Sub

[Perl-unix-users] Checking if a module is installed

2001-03-21 Thread Martin Moss
All, I've devised the following script to check if a CPAN module is installed on a machine, and install it if it isn't. The only problem is, the eval always fails and says it can't find the module, and thus always installs it. Also if I use "use" instead of "Require" it gives me compilation errors

RE: [Perl-unix-users] memory usage of perl processes

2001-03-21 Thread Martin Moss
I guess you could use 'top' in a unix window. Then kick off 1 drone only and look at the memory usage. Then * it by the number of processes you expect. 55 is a lot of processes On Any unix system. Perhaps you could stagger the number of processes. so maybe spawn 30 drones and have each drone

RE: [Perl-unix-users] Memory Leaks, I've sprung a memory Leak

2001-02-28 Thread Martin Moss
Thanks very much to the useful advice I had from the two lists, here's the current situation + code. Having spent most of yesterday in debugging mode it looks like the culprit is the MIME::Entity object. This Object ($entity) is NOT being destroyed when it goes out of scope, however I could not f

[Perl-unix-users] Memory Leaks

2001-02-27 Thread Martin Moss
All, I've got some code which is taking up too myuch memory over a period of time. i.e. it starts with only a nominal percentage of memory use and over a period of a few hours it builds up until it reaches a very high percentage, %50 ish. Anyway I was wondering if anybody could provide me some p

[Perl-unix-users] SetUID?

2001-02-15 Thread Martin Moss
All, On a linux box, I need to write a CGI script which will allow me to restart an INN server. The problem I have is that with the latest version of INN only the "news" user can restart inn (most specifically only the news user can issue the command 'inndstart') How can I write a CGI script wh

[Perl-unix-users] Tape Backups?

2001-02-13 Thread Martin Moss
All, Has anybody had any experience of using perl scripts to backup machines? I'm wondering if there's any modules aout there for communicating with backup devices? Regards Marty ___ Perl-Unix-Users mailing list. To unsubscribe go to http://listser

[Perl-unix-users] How to check if a Module is installed? Defining my own 'CPAN' FTP server for modules

2001-01-09 Thread Martin Moss
I wish to write an installation script which will accompany a new module I've written, It must install the new module, and then check for the presence of some other "inhouse" written modules. If these modules aren't installed on that machine the script will go away and install them. Ideally I'd li

[Perl-unix-users] RE: Callbacks?

2001-01-08 Thread Martin Moss
essage----- > From: Philip Newton [mailto:[EMAIL PROTECTED]] > Sent: Monday 08 January 2001 13:16 > To: 'Martin Moss' > Cc: [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: Callbacks? > > > Martin Moss wrote: > > how can I tell that the reference I

[Perl-unix-users] RE: Callbacks?

2001-01-08 Thread Martin Moss
Thanks for the input guys, one final question, how can I tell that the reference I've been given is actually a reference to a subroutine? Marty > > > > @results=&$myfuncref($param1,$parma2,); > > Alternate syntax: > > @results = $myfuncref->($param1, $param2, ...); > > I prefer the lat

[Perl-unix-users] Callbacks?

2001-01-05 Thread Martin Moss
All, I'm trying to write a callback process in a script I'm writing. Basically I have a reference to a subroutine, and I want to execute that subroutine and pass it some parameters, Can somebody point me in the right direction? Regards Marty ___ Per

RE: [Perl-unix-users] HP Perl course...!@#!

2000-11-21 Thread Martin Moss
Hi, I don't know about the perl course, but I've done a couple of other unix based courses at HP's Pinewood training centre in Bracknell UK, and was impressed with the quality of the classroom,equiment and teaching. don't know about going on a course to learn perl. Buy a couple of books and get

[Perl-unix-users] Getting a guarenteed hostname path

2000-11-10 Thread Martin Moss
Hi all,   Anybody know of a guarenteed method of getting a full hostname & domain name of a unix box.   Hostname() just returns bilbo.   I need bilbo.x.com   Any ideas?   Marty