#perl
04 October 2007
Total 44 pages. You are browsing page 1/44.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Thu Oct 04 00:00:14 2007
--- Day changed Thu Oct 04 2007
00:00 <****> ive just tried to install Parse::Lex module but i was not successfull so i ve installed it using force installl but now icant seems to make it work in my script
00:00 <****> how can i uninstall and reinstall it ?
00:00 <****> prakriti: if ( $array[3] =~ /^[0-9]+$/ ) {
00:01 <****> Or isn't that what you meant?
00:01 <****> i donno what he has meant
00:01 <****> it has seemed to me an incomplete question or expression
00:01 <****> :)
00:01 <****> anyway how can i uninstall a module ?
00:01 <****> yeah shanse, tyvm
00:03 <****> can you !=~ ?
00:04 <****> !~
00:04 <****> oic
00:04 <****> thanks ape
00:04 <****> guess that makes sense
00:04 <****> prakriti, Where's your book?
00:04 <****> what book?
00:04 <****> perlbot, books
00:04 <****> http://books.perl.org
00:05 <****> ack
00:05 <****> you mean paper?
00:05 <****> Any programmer worth their salt is always reading *something*.
00:05 <****> Electronic is sufficient.
00:05 <****> Book, though, not just POD. :)
00:05 <****> Well, right now I am reading an OpenGL book, and a psychology book.
00:06 <****> But no Perl book? :(
00:06 <****> Nope..
00:06 <****> Generally I consult google, unless I am not sure how to phrase the question. In hindsight I should have googled perl operators.
00:07 <****> or just run 'perldoc perlop'
00:07 <****> I should not have known the keyword "perlop"
00:07 <****> then perldoc perl
00:07 <****> hehe
00:08 <****> seriously, it lists all the perldocs
00:08 <****> Yeah I see that.
00:08 <****> perldoc perltoc
00:09 <****> So what you guys are telling me is to quit being lazy and rtfm?
00:09 <****> ^_^
00:09 <****> perllaughingoutloud is my favorite
00:51 <****> Hi, I am using Class::DBI and am getting the "x is not a column of y" error even though my class declarations are in separate files and the class that uses has_a() is included before the class that uses the has_many(). Any ideas what could be causing this? TIA
00:52 * mst sighs
00:52 <****> damn dude sorry... never worked with that module.
00:52 <****> i know mst knows :)
00:52 * ispy_ atleast has a feeling...
00:52 <****> yeah, but I don't really feel like supporting obsolete software at 5 to midnight
00:53 <****> grigora: you want DBIx::Class
00:53 <****> Class::DBI is dead.
00:53 <****> i can agree...
00:53 <****> the author of Class::DBI is a DBIx::Class user.
00:53 <****> nice :)
00:53 <****> the maintainer agrees with me it's idiocy to use Class::DBI in anything except legacy code
00:53 <****> (I was chatting to him at the last conf)
00:54 <****> damn i love perl.
00:54 <****> I've been working in it so much lately, just showing off to my peers...
00:54 <****> was just thinking about that earlier today.
00:54 <****> mst: it is legacy code and I can't change it
00:54 <****> i was using python for a bit ( work made me ) and it was nice to learn and use, but i just love Perl.
00:54 <****> grigora: then you're going to need to actually show us the code
00:55 <****> "grigora" at 76.81.46.52 pasted "task is not a column of App::Communication" (21 lines, 2.9K) at http://sial.org/pbot/27869
00:56 <****> grigora: CODE
00:56 <****> grigora: the CLASS FILES
00:56 <****> I don't give a fuck about the error
00:58 <****> i'll paste the code shortly
00:58 * CPAN upload: Parse-Marpa-v0.1_7 by JKEGL
01:00 <****> grigora: if you aren't ready to show the code, don't ask the question yet
01:01 <****> "grigora" at 76.81.46.52 pasted "class files" (25 lines, 2K) at http://sial.org/pbot/27870
01:03 <****> grigora: probably Communication.pm is being loaded first
01:04 <****> grigora: so it tries to load Task, which then tries to load COmmunication -again-, which means the has_a hasn't been processed
01:04 <****> mst: yes it is being loaded first
01:04 <****> try forcing Task to be loaded first.
01:04 <****> ok, let me try
01:05 <****> Hmm. Doesn't DBIC handle this? :)
01:05 <****> is there a way of using hashes to associate to more than one value?
01:05 <****> yes
01:05 <****> grigora has been forbidden from porting the system though
01:05 <****> Yep, just confirming my own understanding. :)
01:05 <****> nollan: sure, just use something that contains more than one value as your hash value
01:05 <****> nollan: An array reference, perhaps.
01:06 <****> jagerman, ah, like %hash = ("key",@array)
01:06 <****> mst: I just did but still I get the same error, I moved the use Task ahead of use Communication in my startup file
01:07 <****> you sure nothing else calls Communication.pm from a rel further up?
01:07 <****> \@array); or $hash{key} = \@array; or $hash{key} = [LIST]; or similar. See perldoc perlreftut
01:07 <****> jagerman, ok. thanks.
01:07 <****> mst: let me check
01:08 <****> grigora: try sticking BEGIN { warn "...." } statements at the top of both files
01:08 <****> grigora: this sort of crap is almost always loading order.
01:09 <****> 'App::Communication',
01:09 <****> 'create_dt' }); ahead of the Task file
01:10 <****> so if i need to do some text parsing should i do it in perl, or use outside help like sed?
01:10 <****> yfoo, why would you need sed when you have perl? i assume you're doing it inside a perl script and not a shell script
01:11 <****> preaction_: yes using a perl script, whrees a good place to learn about text processing in perl?
01:11 <****> perlbot learn perl
01:11 <****> http://learn.perl.org/library/beginning_perl/
01:11 <****> yfoo: also man perlre
01:11 <****> grigora: you'll need to sort that then
01:11 <****> /me wonders if s2p produces code that people would actually not be afraid of reading.
01:12 <****> s/^ //
01:12 <****> there are other solutions to "text processing". not all text processing requires regular expressions
01:12 <****> most people are afraid of reading most perl...
01:12 <****> grigora: the alternative workaround is just to move the offending has_many out of Task.pm and into Communication.pm
Total 44 pages. You are browsing page 1/44.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
