Re: Changing namserver whois record
On Mon, Feb 17, 2003 at 09:16:26PM +, Robin Szemeti wrote: for instance .. if you upload changes to the .uk root servers, you will notice the whois record on whois.nic.uk chnages immediately ... however the host records are only updated at ~4am, until that point the two records are Unless you're ebay.co.uk, of course. -- Lusercop.net - LARTing Lusers everywhere since 2002
Re: Class::DBI::Join
On Mon, Feb 17, 2003 at 12:37:17PM +, Kate L Pugh wrote: I sent this question to the Class::DBI list last week, but didn't get any replies so I thought I'd ask here too. Can anyone help me out? I think the problem is that Class::DBI::Join is a Schwern-ism, that no-one else knows much about, and he frequently disappears for months at a time ... My guess is that you don't actually want to be using Class::DBI::Join, but using a combination of the has_many-with-optional-mapping-method functionality of Class::DBI itself, with the has_many taking search arguments. Tony
s/$search/$replace/$parameters
I've been banging my head against a brick wall on and off over this one now. I inherited some code that contain the following statement inside two nested for loops: eval \$variable_hash-{'$variable'} =~ s/$search/$replace/$parameters;; I did some benchmarking, and profiling to confirm my suspicions that eval{} inside for(){for(){ ...}} is slow. I thought there must be another way. I found s/(?${parameter}:$search)/$replace/ This was working fine, until I found out that some instances of $replace contain $1. e.g. $search = q[(.+)]; $replace = q['$1']; $search seems to arrive at the function containing this as a qr'd regexp. In this instance $parameters was empty. In the code I'm fighting with $parameter is usually g or nothing. If I passed the value 16/07/2002 14:58:09 to the eval() version I would get: '16/07/2002 14:58:09' If I pass the value 16/07/2002 14:58:09 to the s///, I get: '$1' I'd really like to kill the eval() but don't know how to get $replace expanded in the s/// version. I've recently realised that you can't have s/(?g:$search)/$replace/ so I've tweaked my code to check for g in $parameters and do s///g or s/// accordingly. If anyone has any ideas/pointers/references/solutions I'd really like to hear, Chisel -- e: [EMAIL PROTECTED] | A. Top posters. Q. What is the most w: www.herlpacker.co.uk | annoying thing in e'mail? gpg: D167E7FE |
Re: s/$search/$replace/$parameters
On Tue, Feb 18, 2003 at 09:25:41PM +, Chisel Wright wrote: I found s/(?${parameter}:$search)/$replace/ e.g. $search = q[(.+)]; $replace = q['$1']; If I passed the value 16/07/2002 14:58:09 to the eval() version I would get: '16/07/2002 14:58:09' If I pass the value 16/07/2002 14:58:09 to the s///, I get: '$1' I don't know how you'll get that strategy to work (having $1 in $replace). /e doesn't seem to help and I'm not sure why. Anyway, if you're having trouble with for() { for () { eval } } then move the eval outside, i.e. generate a string that contains the nested for()s and run that code as a single eval. Paul -- Paul Makepeace ... http://paulm.com/ If you scream too loudly, then the tea-leaves will reveal all, in good time. -- http://paulm.com/toys/surrealism/