Re: Confusion about SQL results - row counts and contents differ

2023-01-26 Thread demerphq
On Fri, 27 Jan 2023 at 03:48, Steven Haigh wrote: > > > On Fri, Jan 27 2023 at 10:41:02 +0800, demerphq wrote: > > On Fri, 27 Jan 2023, 10:35 Steven Haigh via modperl, > wrote: >> >> On Thu, Jan 26 2023 at 21:07:17 -0500, Perrin Harkins >> wrote: >>

Re: Confusion about SQL results - row counts and contents differ

2023-01-26 Thread demerphq
On Fri, 27 Jan 2023, 10:35 Steven Haigh via modperl, < modperl@perl.apache.org> wrote: > > > On Thu, Jan 26 2023 at 21:07:17 -0500, Perrin Harkins > wrote: > > Maybe you haven't committed some manual change on the server, so it isn't > visible to other connections. > > > I thought about this - bu

Re: Confusion about SQL results - row counts and contents differ

2023-01-26 Thread demerphq
On Fri, 27 Jan 2023, 09:55 Steven Haigh, wrote: > > > On Fri, Jan 27 2023 at 09:50:42 +0800, demerphq > wrote: > > On Fri, 27 Jan 2023, 09:43 Steven Haigh via modperl, < > modperl@perl.apache.org> wrote: > >> Hi all, >> >> I'm a little con

Re: Confusion about SQL results - row counts and contents differ

2023-01-26 Thread demerphq
On Fri, 27 Jan 2023, 09:43 Steven Haigh via modperl, < modperl@perl.apache.org> wrote: > Hi all, > > I'm a little confused about my little mod_perl web site at the moment. > > I'm doing an SQL query, then punting the results into a dataset to display > via the web page. > > When I do the query dir

Re: Problem with my code for passing block

2022-01-11 Thread demerphq
On Tue, 11 Jan 2022 at 11:35, Jan Kasprzak wrote: > demerphq wrote: > : On Tue, 11 Jan 2022 at 10:18, Yamadaえりな wrote: > : > : > So, I would like to ask another question: > : > Is it safe to pass function reference to the caller (mostly it's the > : > met

Re: Problem with my code for passing block

2022-01-11 Thread demerphq
On Tue, 11 Jan 2022 at 10:18, Yamadaえりな wrote: > So, I would like to ask another question: > Is it safe to pass function reference to the caller (mostly it's the > method instantized from a class) in mod_perl development env? > Or should I avoid using this style? > Nothing wrong with passing cod

Re: Problem with my code for passing block

2022-01-11 Thread demerphq
On Tue, 11 Jan 2022, 16:53 Yamadaえりな, wrote: > Good afternoon, > > Can you help check my problem with this? > > $ cat t1.pl > use strict; > > package Myclass; > > sub new { > my $self = shift; > bless {},$self; > } > > sub run { >my $self = shift; >my $block = shift; >&{$block}; >

Re: how to run regex calculation

2020-01-13 Thread demerphq
Sure you can. See joseph he's answer. 😀 Yves On Mon, 13 Jan 2020, 05:06 Paul B. Henson, wrote: > On Thu, Jan 09, 2020 at 10:36:19AM +0800, Wesley Peng wrote: > > > $str = "2 3 6"; > > > > I want to match with: > > > > true if $str =~ /(\d+)\s(\d+)\s($1*$2)/; > > > > that's to say, the thrid col

Re: how to run regex calculation

2020-01-10 Thread demerphq
On Thu, 9 Jan 2020 at 17:25, MIchael Capone wrote: > > It probably won't ever work. Joseph He's solution works just fine: perl -le'for my $str ("2 3 6", "1 1 1" ,"1 2 3","123 456 56088"){ print "($str)", $str =~ /(\d+)\s(\d+)\s(??{ $1 * $2 })/ ? " matched" : " rejected"}' (2 3 6) matched (1 1 1)

Re: how to run regex calculation

2020-01-09 Thread demerphq
My apologies you were right. I misunderstood the question. Yves On Thu, 9 Jan 2020, 09:39 demerphq, wrote: > On Thu, 9 Jan 2020 at 05:49, Joseph He wrote: > > > > I think $str =~ /(\d+)\s(\d+)\s(??{$1*$2})/ should do it > > My Perl version is v5.26.1 > > I

Re: how to run regex calculation

2020-01-09 Thread demerphq
x27;s original answer was correct. Yves On Thu, 9 Jan 2020, 09:40 Wesley Peng, wrote: > Hallo > > on 2020/1/9 16:35, demerphq wrote: > > $str=~/(\d+)\s(\d+)\s(\1*\2)/ > > > > $1 refers to the capture buffers from the last completed match, \1 > > inside of the pattern

Re: how to run regex calculation

2020-01-09 Thread demerphq
On Thu, 9 Jan 2020 at 05:49, Joseph He wrote: > > I think $str =~ /(\d+)\s(\d+)\s(??{$1*$2})/ should do it > My Perl version is v5.26.1 I think you mean (??{ "$1*$2"}) which might work, but it will be error prone, (??{"(?$1)*$2") would be better, but both will be slow, as each time a new patte

Re: how to run regex calculation

2020-01-09 Thread demerphq
This isnt really the forum for random perl help, i suggest Perlmonks instead. $str=~/(\d+)\s(\d+)\s(\1*\2)/ $1 refers to the capture buffers from the last completed match, \1 inside of the pattern part of a regex refers to the capture buffer of the currently matching regex. Yves On Thu, 9 Jan 2

Re: Upgrade to Debian stretch (stable) breaks my unique token

2018-03-01 Thread demerphq
On 2 Mar 2018 03:26, "John Dunlap" wrote: Have you tried this in your Apache config? PerlChildInitHandler "sub { srand }" Citation: http://blogs.perl.org/users/brian_phillips/2010/ 06/when-rand-isnt-random.html On Thu, Mar 1, 2018 at 1:55 PM, Vincent Veyron wrote: > Hi all, > > I'm using the

Re: random token re-used in subsequent requests [SOLVED]

2016-05-31 Thread demerphq
On 27 May 2016 at 09:29, André Warnier wrote: > On 26.05.2016 16:01, Vincent Veyron wrote: >> >> On Mon, 16 May 2016 16:38:18 +0200 >> Vincent Veyron wrote: >> >>> Out of five different servers, the code works fine on four machines, and >>> a different token is generated every time the page is lo

Re: random token re-used in subsequent requests

2016-05-17 Thread demerphq
On 17 May 2016 at 20:37, André Warnier wrote: > On 17.05.2016 20:26, demerphq wrote: >> >> On 17 May 2016 at 20:23, demerphq wrote: >>> >>> On 16 May 2016 at 20:03, Bruce Johnson >>> wrote: >>>> >>>> >&

Re: random token re-used in subsequent requests

2016-05-17 Thread demerphq
On 17 May 2016 at 15:10, André Warnier wrote: > On 17.05.2016 14:11, Vincent Veyron wrote: >> >> On Tue, 17 May 2016 10:16:43 +0200 >> André Warnier wrote: >>> >>> >>> I don't see above any signifiant difference in configuration between the >>> servers, apart >>> from the fact that the "faulty" s

Re: random token re-used in subsequent requests

2016-05-17 Thread demerphq
On 17 May 2016 at 20:23, demerphq wrote: > On 16 May 2016 at 20:03, Bruce Johnson wrote: >> >>> On May 16, 2016, at 10:15 AM, André Warnier (tomcat) >>> wrote: >>> >>> >>> join "", map +(0..9,"a".."z","A

Re: random token re-used in subsequent requests

2016-05-17 Thread demerphq
On 16 May 2016 at 20:03, Bruce Johnson wrote: > >> On May 16, 2016, at 10:15 AM, André Warnier (tomcat) wrote: >> >> >> join "", map +(0..9,"a".."z","A".."Z")[rand(10+26*2)], 1..32 ; >> >> looks at first sight to me like quite inefficient and probably likely to >> generate the same string regul

Re: [OT] AW: Unsuccessful stat on filename containing newline in RegistryCooker.pm

2013-03-01 Thread demerphq
On 28 February 2013 21:12, André Warnier wrote: > I am ranting, and I know it. But the basic fact is that " ", in 99% of > programming languages I doubt it, considering all the major languages I know of use a "," to separate arguments. And if you are in a programming language then the filename

Re: [OT] AW: Unsuccessful stat on filename containing newline in RegistryCooker.pm

2013-02-28 Thread demerphq
On 28 February 2013 13:29, André Warnier wrote: > alexander.elg...@external.t-systems.com wrote: > ... > >> I am pretty shure, I tested the capability of filenames on a Linux (ext2) >> or Solaris (ufs) filesystem, a long time ago >> The outcome was, that you can use 254 different characters, excep

Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault

2012-11-13 Thread demerphq
On 13 November 2012 15:23, Ævar Arnfjörð Bjarmason wrote: > On Sat, Sep 29, 2012 at 1:08 PM, Stefan Profanter > wrote: >>> > >>> > Looks like you are using Storable to stream out cookies? Looks like >>> > something in there is causing Storable to puke. I see things like >>> > array_call, store_

Re: Module preloading on virtual hosts

2012-10-26 Thread demerphq
On 25 October 2012 16:26, Randolf Richardson wrote: >> Hello, >> >> I've problem with preloading JSON module on apache virtual hosts. I've >> asked about that on #perl-help and #modperl IRC channels and i was advised >> to ask my question here. I've described my setup with config files: >> http://

Re: reloading perl modules under heavy load

2012-10-04 Thread demerphq
On 4 October 2012 16:36, Jason Aubrey wrote: > Thanks all for your replies to my question. > > Because of the nature of our application, we can't really load everything at > start up, but I did some digging and there are clearly some inefficiencies > here and the situation would indeed be improved

Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault

2012-09-28 Thread demerphq
On 28 September 2012 17:10, Andy Colson wrote: > > On 09/28/2012 08:07 AM, Stefan Profanter wrote: >> >> Hi! >> >> Posted this question already on Catalyst Mailing List, but got no answer >> yet and I think this problem is caused by mod_perl somewhere. >> >> I programmed a Catalyst Application whi

Re: [Fwd: RE: Safe handling of an SQL query]

2012-04-16 Thread demerphq
On 16 April 2012 18:06, Vincent Veyron wrote: > b) You should always keep the control over the selects which are > fired against your db. Otherwise someone can bring down the db > very easy. You might want to look into setting up a slow query killer. Then you dont have to worry about this. Yves

Re: highscalability.com report

2012-04-04 Thread demerphq
On 4 April 2012 09:31, William A. Rowe Jr. wrote: > On 4/3/2012 9:50 PM, Jim Schueler wrote: >> Hope this doesn't get trapped by too many spam filters. >> >> Sad news.  Just saw a blog >> >>   http://www.highscalability.com/ >> >> that reports YouPorn.com switched from Perl to PHP.  Apparently the

Segfault in mod_perl 1 during global destruction due to Apache::Table refcount issues

2011-03-24 Thread demerphq
We recently ran into the problem documented here: http://www.mail-archive.com/modperl@perl.apache.org/msg00947.html http://tech.groups.yahoo.com/group/modperl/messages/55410?threaded=1&m=e&var=1&tidx=1 We ended up finding the offending global storage that was holding on the Apache::Table

Re: mod_perl-2.0.4 with Apache 2.2.9 and perl 5.10.0 intermittent crashing

2010-01-28 Thread demerphq
2010/1/28 Pas Argenio : > Thanks John.  Currently, I'm building 32-bit for a Sparc platform and also > with man CPAN modules such as DBI and DBD. > > I just rebuilt everything carefully, but still coring often before then > displaying a page: >    Apache 2.2.8   Perl 5.10.0   mod_perl 2.0.3 > > I a