| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Comments:
<0> maybe? <1> No? <0> i forget <1> ? <2> I got it to work, don't know why, it appeared that the web page was being cached, thanks for the help all :) <3> Hey all. Is there a mechanism in perl for deleting, unloading, or whatever you want to call it, subroutines? <4> Botje: Which OS do you use for your desktop? <1> iank: Yes! <3> buu: woohoo! <3> Tell me =) <4> iank: Not really, but you can use a hash of coderefs to do something like that. <1> iank: Generally however it's not the best of ideas. <1> iank: You should instead manually store the references in a datastructure. <1> (Which is really what perl does anyway( <1> iank: See 'delete
<1> ' <3> woosh =) <3> Thanks. <3> Hmm. Doesn't seem like 'delete' deletes subs... <4> iank: You can do things like: <3> I want to be able to dynamically load perl code, unload it, and reload it (if it was edited between the unload and the reload, the edited version must be the one that is loaded.) <4> perl -wle 'sub x {print "X"}; x(); *x=sub{print "Y"}; x()' <5> iank: you can just re-define, you don't have to unload <4> perl -wle 'sub x {print "X"}; x(); *x=sub{}; x()' <4> Which makes it go away. <3> tybalt89: I sure could. But if it runs for a long time, unloading and reloading away, lots of copies laying around would be Bad(tm) <6> iank, do it like my IRC bot, I have the reloadable code in a module <6> When I do !reload it deletes then reloads the module <5> iank: nope, no copies... <4> iank: What are you trying to accomlish? <4> p <3> tybalt89: I guess I missed what you were saying =]. Thought you meant 'define a new one' when you said 'redefine' <3> Yaakov: I can't talk about it, kittens die when I try to describe. <4> iank: Ah. <4> iank: Funny, I find myself unable to talk about possible solutions as well. <3> uhu. So I can just redefine a subroutine by... defining another subroutine with the same name? (Sorry for all the noobish questions...) <3> Yaakov: what I described above (needing to be able to reload some changed code while running) should be enough for you ;] <4> iank: Turns out it isn't. <3> *shrug* <3> Sorry =P <4> iank: Good luck. <3> Thanks. <7> Bonjour. <4> tybalt89: I am unhappy with FreeBSD... or ports... or apr... or svn, or something. <5> Yaakov: pick something :) <4> tybalt89: They are all intertwined. <5> Yaakov: you're trying to get svn running on FreeBSD ? <4> tybalt89: Well, I have done it. I am failing at a repeat performance. <4> It is running like a champ on my 5.1 box. <5> repeats should be the easy part :) <4> On 5.4 configure for apr refuses to find mmap. <4> That leads to a failure. <4> It seems to be related to the choice of -lpthread as the argument for threads. <5> Yaakov: the only bsd I've run was pico-bsd from a floppy <4> They still have that in ports. <8> hey, has anyone here ever had problems with perl giving segmentation faults? <4> reevesj: No, I can get it to segfault whenever I want. <4> phoenix# perl -e dump <4> Abort (core dumped) <4> Well, that isn't REALLY a segfault., <4> But it is a coredump! <9> ok guys hello. i have a problem with prepare_cached in perl's DBI thing, please <9> may i paste the code and confusing output or what. <9> :| <10> hehehe Yaakov <10> cant paste code in here man <9> k <10> read the freakin topic <10> help does occur, though :) <9> well it's saying not to run it with an undefined value but, it's defined. and: i stopped reading the topic at "just ask", ha ha ha <11> "occur" ? <9> my bad <10> infi: yeah, i've seen it occur. :) <9> i see where the data goes. <12> flamoot: that wasn't the topic
<9> i don't know if i need it if someone has some idea what's happening. or what <9> oh. <9> wow, that topic is concise <12> flamoot: that was the annoying channel banner feature that freenode has :) <9> it is confusing :) <9> ok <1> What? <13> "flamoot" at 72.142.16.71 pasted "prepare_cached says not to run it with an undefined value, but it is defined." (25 lines, 941B) at http://sial.org/pbot/15706 <9> ok. <9> ty pasteling <9> :| <12> flamoot: the question isn't whether $st is defined <12> flamoot: it's talking about $dbh <9> hobbs <9> when i read my question with mounting horror that began to occur to me <9> ty <9> i am looking into it now :| <6> Question: my $foo = "$foobar $zomg asd $fasdfa"; How would I use regexp to grab everything starting with $ into $1, $2, etc? <9> my &dbconnect ends with return; <9> ha ha ha <9> k thanks guys <9> awesome <12> K: @matches = ($foo =~ /(\$\w+)/g) more or less <6> hobbs, thanks <12> K: It doesn't go into the numbered variables, but that's okay. Those aren't good to work with anyway <5> K: in double quotes those $ are not there... <6> Oh, they aren't? <6> Single quotes then? <12> K: Oh, good point. I didn't actually notice that, but yeah, if you do that literally you'll get either a bunch of errors or " asd " :) <12> K: Or something unpredictable <6> Oh <6> okay <6> Hrm. <8> how do you make perl segfault? <14> i've seen it <1> dump() ? <6> I've seen it too <6> no idea how I did it though <6> :P <14> ditto <5> try putting a regex inside /(??{...})/ I think that does it... <8> hmm <8> I wonder if that's what's causing it for me <14> isn't that still considered experimental? <15> DON'T DO IT! <14> see <15> IT'LL WARP THE FABRIC OF SPACE-TIME <15> and you don't want wrinkles in THAT. <15> that's $95 a yard <8> nah, that regex doesnt cause a segfault, perl just says it can't compile it <5> japhy: $95 a yard, and it still stretches out of shape near large bodies :( <11> and warp bubbles <15> ok, I broke the regex engine. <6> I don't get it, suddenly my bot becomes all unresponsive and dies of a ping timeout :\ <6> Worked fine yesterday.. <14> japhy, do you want a medal? <3> (Where 'a medal' == 'most of a doughnut') <15> $_ = "XYZ"; /(?{ $_ = "" })(.)/ and print "<$1>"; <12> heh, that's a good one <12> japhy: doesn't crash here <15> it doesn't CRASH. but it succeeds and prints nothing. <14> yeah, no crash under -e <12> japhy: and I'd say if you do that, anything _other_ than a crash is acceptable :) <12> but yeah, it's incredibly weird that . could successfully match _nothing_ :) <1> I think there needs to be an IQ test for talking about Perl <16> if you were just learning perl where might you go for example-based tutorials ? <1> perlbot tutorials > AIChains <16> thank you very much ! <12> www dot the internet slash google <16> i googled already sigh <14> you looked at perl.org? <14> isn't there something there <16> im going to review the links sent to me by the bot
Return to
#perl or Go to some related
logs:
rtcw et problem freeze #osdev #fedora httrach #linux #css #perl #asm dc_LOCAL_DELIVERY= drivers CNet PRO200WL x64
|
|