@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19



Comments:

<0> heh
<1> By the way, POE::Kernel rapes all processes when they're idle
<0> o_O
<1> how do I ask it to fire an event when something happens, without knowing when it'll happen?
<0> it's document that it reaps children, yes
<1> I mean, all sessions
<1> Like
<0> sdakota: $kernel->select_read
<0> select_* in fact
<0> all event either come from timers or file descriptors in the default event loop
<1> I want to create a socket (probably in &server_start), and then when a connection request happens, execute a subroutine
<2> you are creating and killing sessions for every request?
<1> Well
<1> I'll probably create a new session when a request comes in
<1> so yes
<0> you're using a SocketFactory?



<1> the session will hopefully kill itself when the connection is closed (or there must be some way)
<1> a what?
<0> (You have seen the cookbook, right?)
<0> sdakota: you know at least what a wheel is?
<1> Yea, but I don't have it (the cookbook)
<1> well yea, my bicycle hopefully has two
<0> sdakota: sessions are reference counted. Just remove your aliases on the session, and make sure there's no pending events on the session, and no file handle watches (the select_*) things, etc, and your session will be cleaned up
<1> Hey
<0> sdakota: No, I mean the POE cookbook: http://poe.perl.org/?POE_Cookbook
<1> POE::Wheel::ListenAccept...
<0> http://search.cpan.org/dist/POE is a darn useful way to list all the modules in a distribution :) Including seeing that there's a SocketFactory :)
<0> sdakota: there's also TCP::Server and TCP::Client components
<1> Heh
<1> Oh that
<1> yes, i've seen that cookbook
<1> but i'm currently reading http://poe.perl.org/?Evolution_of_a_POE_Server
<3> hello, why doesn't this work? my ($confid) = $email =~ m/\d{7,10}/
<4> no capturing groups in regex
<0> a lack of understanding of what m// does in list context?
<3> how do i extract a sequence of numbers that might be 7 to 10 long ?
<3> integral: i have a lack of understanding of everything lol
<0> thin: do you understand what () do? (especially the difference from (?:))
<3> nope..
<3> you mean for the regex?
<0> yes, in a regex
<3> cool
<0> cool?
<5> perldoc perlrequick
<6> The perldoc for perlrequick - is at http://perldoc.perl.org/perlrequick.html
<7> how to print EOF?
<5> print "EOF"
<7> i mean EOF, not "EOF"
<2> close the handle :)
<7> my prog works with inetd
<5> then close STDOUT
<7> hm
<7> do i need open it again when i have second request?
<3> hmm, putting a \s at the begining of the regexp doesn't match the string when the string happens to be at the very start of the line.. but in other cases it won't be at the start of the line.. any ideas?
<5> moon_lander: no, every request will launch a new instance of your program
<5> thin: (^|\s) or something better depending on your situation
<8> hmm
<8> is there a way to have a per-user cpan repository?
<5> perlbot, life with cpan
<9> Information pertaining to the Comprehensive Perl Archive Network (CPAN) can be found at http://sial.org/howto/perl/life-with-cpan/
<5> paq: see the link at the bottom of that page
<8> Sound, thank you
<3> thanks all
<7> !$_
<10> Hi, anyone here uses (or has parsed) live.com mail ?
<11> Is there a nice way to do a ifdef -like conditional usage of constants in perl?
<11> ($foo>2)?use constant BAR => 'gt':use constant BAR => 'le'; generates a 'BAR redefined' -warning
<5> Zapelius_: you might want eval "use constant BAR => 'gt'"
<11> mm..
<11> no. it won't work
<12> there's -P, but that's a bad idea
<12> what do you need ifdef-like conditionals?
<11> i can do it w/o constants, but I like that the compiler warns about possible changes of 'BAR' (coding errors)
<11> so it would be for doing safer programming :)
<12> how about http://search.cpan.org/perldoc/Readonly
<11> thrig, that looks good. I hope it will warn at compile time, quick read told me (must read more) that the program will die my trying mod a ro $var
<11> I have no time/possibilities to test all possible situations :)



<13> automatic testing.
<13> once you have the framework inplace it becomes easy to add new cases.
<14> ~pastebin
<14> tell christo about pastebin
<14> ban - I'll use pastebin.ca
<15> o0
<12> no, they don't read the topic nor the chanserv message
<16> Someone at 212.18.226.160 pasted "Segmentation fauilt with DBI" (30 lines, 878B) at http://sial.org/pbot/16031
<12> how were perl, DBI, DBD::mysql, and mysql compiled?
<14> thrig - they were built at the CPAN> prompt. They appear to work just fine elsewhere
<13> my guess is that the DBD/mysql.so is not finding the rigt version of the mysql libraries.
<12> all with the same compiler? current versions of MySQL and DBD::mysql?
<5> christo: type 'gdb perl'
<5> christo: then type 'set args carnival-linked.pl' and then type 'run'
<5> christo: then put the output in the pastebot
<14> Sound - before I do that, can you just explain what it will do?
<14> :)
<5> christo: that will hopefully give us more information about what is causing the segfault
<17> gdb = debugger
<14> Sound - Nothing was found under any of the categories and the Program exited normally
<14> it just says "no debugging symbols found" a heap of times
<5> did the program segfault?
<14> no
<5> well, that means that it happens only sometimes...
<14> it happens every time I run the script from the cli
<5> christo: try to run it as 'perl carnival-linked.pl'
<5> there's 1% possibility you have two perls installed :)
<14> Undefined command: "perl". Try "help".
<14> ok - I tried: run /usr/bin/perl carnival-linked.pl
<14> it died with: Unrecognized character \x7F at /usr/bin/perl line 1.
<14> that's weird
<5> no no
<5> I mean to run the script as 'perl script.pl' from the shell, not gdb
<14> perl ./carnival-linked.pl segfaults
<5> no idea :-|
<14> /usr/bin/perl does the same
<14> aye
<14> me neither :S
<14> I'm going to try it on a different machine
<16> "yingfan" at 60.248.158.82 pasted "#!/usr/local/bin/perl $file =" (11 lines, 251B) at http://sial.org/pbot/16032
<18> anyone who could help me see whats wrong?
<4> yingfan: use warnings; use strict;
<4> always check open's return value
<19> be aggressive.
<4> // doesn't do what you think it does
<4> even if it did, it would still be wrong
<18> yes, i tried /""/ as well, but still no go
<4> /""/ searches for the string '""'
<19> GumbyBRAIN: comment on yingfan's code.
<20> BinGOs: is that code for my delicate state of my code works.
<4> if // wasn't special, it would search for the empty string, ''
<4> every string contains '', so it would always match
<18> so how do you print until an empty line?
<21> yingfan: with /^$/
<4> however, an empty pattern actually reuses the last successful pattern, i.e. archive in your case
<16> "thrig" at 24.18.113.243 pasted "Example for yingfan" (13 lines, 194B) at http://sial.org/pbot/16033
<19> or if you chomp, then $_ will no longer be true.
<12> err, whups
<19> or whatever you are stuffing whatever into. i haven't looked at the code sorry.
<17> BinGOs - that's a bad idea
<17> because if $_ is '0' then it will still be false
<17> but '0' ne empty line
<18> i dont understand, is there a special variable for empty line?
<16> "thrig" at 24.18.113.243 pasted "Workding example for yingfan" (15 lines, 241B) at http://sial.org/pbot/16034
<17> you could chomp and then test for length
<19> so's sticking a candle up one's arse. it has never stopped me.
<19> erm ...
<19> lead poisoning
<12> pencils have lead?
<17> pencils haven't used lead in like ages
<17> graphite
<18> thanks thrig, but your usage is beyond my understanding, any way of correcting my code so it works?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#perl
dom ischeckbox
#lisp
#ubuntu
#physics
ubuntu mutt sasl authentication failed
#debian
#linuxhelp
fedora not init font path element unix 7100
ceiling cat is watching you masurbate



Home  |  disclaimer  |  contact  |  submit quotes