<alnewkirk> ironcamel++ great responsiveness <alnewkirk> … im less SQL these days <alnewkirk> SQL is that old diseased dog I’m going to take out back and put down <alnewkirk> im Newt Gingrich and SQL is my first wife <ironcamel> hahaha <pkrumins> taking a bath http://i.imgur.com/mNQ4m.jpg * GumbyPAN CPAN Upload: WWW-Giraffi-API-0.13_04 by HOLLY http://metacpan.org/release/HOLLY/WWW-Giraffi-API-0.13_04 * GumbyPAN CPAN Upload: Finance-Bank-ID-BCA-0.22 by SHARYANTO http://metacpan.org/release/SHARYANTO/Finance-Bank-ID-BCA-0.22 * GumbyPAN CPAN Upload: Finance-Bank-ID-Mandiri-0.22 by SHARYANTO http://metacpan.org/release/SHARYANTO/Finance-Bank-ID-Mandiri-0.22 * GumbyPAN CPAN Upload: Parse-RecDescent-1.967_004 by JTBRAUN http://metacpan.org/release/JTBRAUN/Parse-RecDescent-1.967_004 <prg318> Is there a way to quit a perl script midway like exit() in C? <mauke> yes <prg318> what might that be :D <leontopod> die <leontopod> hi mauke! =) <Khisanth> or … exit <prg318> Khisanth: perfect; thanks <mauke> prg318: have you considered checking the documentation? <prg318> die was bringing up “Server Error!” with mod_perl/apache because returning error state <prg318> mauke: well I knew about die I was wondering if there was another — I should have been more specific in my question <mauke> prg318: have you considered checking the documentation? <Khisanth> uh that is going to cause apache to exit <prg318> mauke: well I knew about die I was wondering if there was another — I should have been more specific in my question <mauke> prg318: have you considered checking the documentation? <prg318> Khisanth: why on earth would it do that? <Khisanth> do you know what mod_perl is? <prg318> Anyway; my script works fine now. Thanks ! <leontopod> you could make it stop with 1 while; <mauke> prg318: hello? <prg318> prg318: hey <prg318> mauke: also hello <mauke> prg318: could you answer my question? <prg318> /ignore mauke <mauke> I’ll take that as a “no” <mauke> (for the record, perldoc perlfunc has a list of functions grouped by category) <buu> mauke: What does $a do? <mauke> buu: have you considered checking the documentation? <mauke> it’s at http://freenode.net/using_the_network.shtml :-) <buu> =[ <prg318`> lol what the hell <buu> You are the documentation beneath my wings. <mauke> prg318`: hi <thrig> I'm sure there's an account of that string somewhere <mauke> prg318`: you're currently evading a ban <prg318`> mauke: hey <prg318`> sorry? i just came to ask a question <mauke> prg318`: and you refused to answer mine <buu> I'm glad to see irc mode syntax is slowly evolving into lisp. <prg318`> and thanks Khisanth for answering it; i just needed a return 0 or equivilent <mauke> prg318`: hey, you're ignoring me again <prg318`> prg318`: i've read/ am reading the documentation <prg318`> mauke: ^^ <mauke> cool story, bro <buu> useful <pkrumins_> BUU <jfriedl> ( A question of curiosity if I may; Why is it called "evading a ban" instead of "circumventing a ban" ? I thought "to evade" was similar to "to run or get away [from something]” or “avoid getting cause; to el<mauke> oh, good question <mauke> .oO( I’m going to evade that question ) <jfriedl> Just like, “the bad guy evaded the police”, meaning he got away. He elluded capture. <jfriedl> mauke: np, was just curious and sorta thinking aloud. <jfriedl> When ever I hear someone say “$foo evaded a ban”, I can’t help but conjure up an image of some $random being chased by a channel op and getting away :) (It just always seemed like the wrong word, unless there<thrig> evade has a legal sense, “to defeat the intention of (a law, stipulation, etc.)” (OED, p. 446) <jfriedl> thrig: perhaps, though circumvenstion seems (to me at least) to fit better too. I could be totally wrong though. <Rhomber> I had code that was working, ive tried to use it in a different way, and now it doesn’t work.. to do with Exporting constants.. so to simplify/avoid circular dependencies I have split it out into a new module<Rhomber> im baffled, its a very simple scenario :( <jfriedl> Most of the time, m hear it used like, “he evaded the cops”, or “he evaded prosecution by fleeing to Canada” <Rhomber> doesn’t even work if i qw(OUTCOME_CONTENTION); <mauke> Rhomber: your module doesn’t export anything <Khisanth> that code is missing a very important line of code … <Rhomber> mauke: our @EXPORT ? <mauke> Rhomber: what about it? <Rhomber> isn’t that the ‘default exports’ ? <mauke> no, that’s just a variable <Rhomber> ok, how do i fix it? because this works elsewhere.. i normally use @EXPORT_TAGS though, when i made this i wanted to make default exports <mauke> this doesn’t work elsewhere <mauke> Rhomber: ‘use Some::Module;’ is equivalent to ‘BEGIN { require “Some/Module.pm”; Some::Module->import(); }’ <Rhomber> i forgot @ISA = qw(Exporter); <Rhomber> works now <mauke> Some::Module->import() is responsible for importing stuff <mauke> your module doesn’t have an import method <Rhomber> it doesn’t need one <mauke> yes, it does <Rhomber> that’s handled by Exporter <Rhomber> no, it doesn’t <Rhomber> http://search.cpan.org/~toddr/Exporter-5.66/lib/Exporter.pm <mauke> dude. shut up when you have no idea <Rhomber> clearly i do, because it works <mauke> @ISA = qw(Exporter); sets up inheritance <Rhomber> fuck your arrogant arent you <Rhomber> and wrong <mauke> now that you’re inheriting from Exporter, you’re also inheriting its import method <mauke> how am I wrong? <Rhomber> exactly, to use default functionality provided when i set @EXPORT, @EXPORT_OK, @EXPORT_TAGS <Rhomber> because i don’t need an import method <Rhomber> im using Exporter <mauke> and Exporter gives you an import method <Rhomber> great. <mauke> I didn’t say you have to write it yourself <Rhomber> Khisanth: thanks man, YOU were right :) <mauke> your choices are: 1) write it by hand; 2) use a module to generate it for you; 3) inherit it <Rhomber> no, but you weren’t at all helpful for the scenario <mauke> use Exporter qw(import); does #2 <mauke> inheriting from Exporter via @ISA = ‘Exporter’ or use base ‘Exporter’; does #3 <Rhomber> clearly your mistaking me for someone else <mauke> I don’t care about “helpful for the scenario”, I’m trying to help you understand a bit better what’s going on behind the scenes <Rhomber> i know how import works <mauke> that way you’ll hopefully be able to debug similar problems yourself in the future <Rhomber> i was just needing a 2nd eyeball to see what i was doing wrong.. as im stressed out <Rhomber> ive written custom import methods before.. but im using Exporter <mauke> yeah, but why not ‘use base qw(Exporter);’? <mauke> saves you a line you might forget otherwise <Rhomber> dude. shut up when you have no idea == FUCK HEAD mentality. you have no idea what i know and do not know. <Rhomber> so if your going to be helpful, be so.. otherwise YOU shut up <Rhomber> good day. <mauke> Rhomber: another thing, “your” does not stand for “you are” <mmap_> I think that’s the first time I’ve ever heard someone tell mauke he has no idea.. <Rhomber> what your an english teacher too now? <mmap_> heh <mauke> Rhomber: *you’re <mauke> and a comma after “what” <mmap_> Rhomber: You’re really making yourself look stupid, you might as well just stop now.. <buu> If you’re speaking english you should probably do it correctly. <Rhomber> mmap_: read up, i didn’t say he had no idea. i said he was wrong.. i didn’t need an import method.. and the code clearly indiciated i was using Exporter <mauke> you do need an import method because that’s all ‘use’ does (besides loading the code): it calls your import method <mmap_> Rhomber: You said “shut up when you have no idea”.. I think you should just stop now, you’re embarassing yourself. <scp1> a key to learn things from other people lies in admitting you’re wrong when you are. <mauke> mmap_: no, I said that <mauke> Rhomber was quoting me <mmap_> then he said it ;-) <mmap_> haha <mmap_> ok ok <Rhomber> well you all sit behind your keyboards and have fun in your chat room. i bet those of you who are being rude have no life and were bullied as children so you have to take it out on people now. Just because yo<Rhomber> rid of the chips on your shoulders, it’s misplaced and childish. I could care less if I can say ‘youre’ or ‘you’re’.. grow up. <Rhomber> mmap_: well, you should as you are. clearly you can’t read <mauke> Rhomber: *you’re, *it’s, *couldn’t care less <mauke> also, bullied as children? I am children! <Rhomber> bravo, you’re an idiot <Rhomber> im going to get back to work <mauke> Rhomber: comma after “see” <mauke> Rhomber: *I’m <scp1> most of us were bullied, and now you come here and continue the bullying <Rhomber> you are children? that explains alot <buu> I wasn’t bullied =[ <mauke> Rhomber: *a lot <buu> I think I missed out on a valuable life experience <Rhomber> scp1: how am i a bully? im being harrassed by mauke <mauke> Rhomber: *I'm <mmap_> haha <Khisanth> well unless they have started with the whole vat grown thing ... <Khisanth> even Jesus had a mother <Rhomber> mauke: well congratulations. you failed at life, but passed english <mauke> thanks! <buu> *Thanks! <mauke> :-( <mauke> actually I dropped english in school <buu> Come now. <buu> If we're getting pedantic... * mauke fires up gcc -pedantic -malign-double <Rhomber> well i left at the end of year 10, didn't stop me. i write code.. not letters. and when writing formally i pay attention.. IRC isn't something i take care in with every word being perfect. <Rhomber> and im not a newby to perl. but i work from home.. i just needed an eyeball to help me out <mauke> *newbie <Rhomber> not to be treated like you did <Rhomber> thats subjective mauke <mauke> *that's <mauke> comma after "subjective" <Rhomber> god, you're acting like a 3 year old <Rhomber> what are you going to start parroting me next? <mauke> Rhomber: that last one didn't parse <mauke> are you missing a comma somewhere? <Rhomber> i think 'i am children', although a flawed statement is completely true. Completely evident by your actions <scp1> Rhomber, would you've been less offended if we simply told you what line was missing, and when you clearly showed that you didn't know how use and import works, we'd ignored that instead of telling you how it wohttp://metacpan.org/release/GRAY/POSIX-RT-Spawn-0.10 * GumbyPAN CPAN Upload: Template-Toolkit-2.24 by ABW http://metacpan.org/release/ABW/Template-Toolkit-2.24 <mauke> scp1: I'd say yes <Rhomber> scp1: i know how it works, read up. ive used Exporter for many, many years. Don't defend mauke. I just wanted an eyeball to see my obvious mistake.. I knew it was trivial, something I had missed. Why is that <mauke> Rhomber: the problem isn't a missing line, the problem is that you couldn't debug it yourself <scp1> used Exporter does not equal understanding how it works <Rhomber> So yes, I would very much have just appreciated the answer and not the details - I know the details.. I am just very buisy/stressed and needed to have a second eye on what id done wrong <Rhomber> scp1: Well I do. <Rhomber> why are you all so up yourselfs? <Rhomber> what have you got to prove to the world? <mauke> "yourselfs" :-( <mauke> Rhomber: er, nothing? <Rhomber> that your brains are big because your dicks are small? <Rhomber> what is it with you? <mmap_> If you're so busy, why are you still here? <mauke> what do my brains have to do with it? <Rhomber> mmap_: I don't know.. I just hate people who are like this. I tend to get heated. I will go now.. I doubt any of you who are being idiots will learn anyway <scp1> ok. I, at least, do appreciate when people tell me I'm wrong, because that gives me a change to learn something <scp1> chance, even. <prometheanfire> scp1: you and me both :D <mauke> Rhomber: what can you learn me? <Rhomber> scp1: I appreciate it when I ask for something that im given the answer. Telling me I don't understand Exporter isn't the truth, telling me to shut up because I don't know anything is also a load of crap. <mauke> Rhomber: I didn't say you don't understand Exporter <Rhomber> mauke: 'what can you learn me' ??? <Rhomber> yes, well the answer was a missing @ISA <Rhomber> nothing more, nothing less <Rhomber> my former problem was a circular dependency which ive solved so im happy now <mauke> your module doesn't have an import method it doesn't need one yes, it does no, it doesn't dude. shut up when you have no idea <Rhomber> just missed the @ISA <Rhomber> i didn't need an import method! it may be true that the code stack needed one, but I am using Exporter.. so no, 'I' as in the module, didn't need one! <mauke> just saying "no, it doesn't" when I've just explained how it works (and I know how it works) tends to piss me off <mauke> "using Exporter" isn't enough, you also need to 2) have it generate an import method for you or 3) inherit from it <Rhomber> yes, but I knew it didn't.. As I said, im not new to this. I knew it was something trivial.. and I found it on my own <Rhomber> 2, is incorrect.. it doesn't 'generate' one. it 'provides' one through inheritance <mauke> Rhomber: ok, you don't even know how Exporter works <mauke> and you don't know what "or" means o_O <mauke> ... if anyone's interested in learning more about #2 or #3, check the synopsis of perldoc Exporter * GumbyPAN CPAN Upload: Bundle-CPAN-1.859 by ANDK http://metacpan.org/release/ANDK/Bundle-CPAN-1.859 <scp1> why so sensitive. * GumbyPAN CPAN Upload: Combinator-0.04.01 by CINDY http://metacpan.org/release/CINDY/Combinator-0.04.01 <Su-Shee> good morning everyone. <bloo_sky> are you sure it's good? * GumbyPAN CPAN Upload: Badger-0.09 by ABW http://metacpan.org/release/ABW/Badger-0.09 <Su-Shee> yes. I have a large coffee, homemade bread with homemade chocolat-hazelnut spread and I'm looking out into a bright blue sky. <jimmy_birer> omg perl sux <jimmy_birer> visual basik is betta <jimmy_birer> ;) <jimmy_birer> it write better programz <jimmy_birer> and im a hax0r so i kno it <prometheanfire> I'm trying to get read anything from this but I know little perl and even less JSON::XS <prometheanfire> my $decoded_json = $json->decode($response->decoded_content); <prometheanfire> when I print $decoded_json I only get the hash back, I think I need to access an object within, but don't know how <gryzor> prometheanfire: use Data::Dumper; print Dump($decoded_json); <jimmy_birer> prometheanfire: its becos ur a fagget lol <gryzor> or probably that's Dumper(), not Dump() <prometheanfire> gryzor: thanks <jimmy_birer> gryzor:dont help him <prometheanfire> and here I thought perl people wern't assholes lol <gryzor> prometheanfire: just ignore the troll totally, and you'll be fine <prometheanfire> gryzor: ya, I try to keep my ignore list small, but sometimes it has to grow right? :D <prometheanfire> gryzor: thanks, that worked, now all I have to do is figure out how to get an object from it lol <prometheanfire> ah, http://stackoverflow.com/questions/2354792/how-to-access-data-stored-in-hash should help :D * GumbyPAN CPAN Upload: App-pmuninstall-0.29 by XAICRON http://metacpan.org/release/XAICRON/App-pmuninstall-0.29 * GumbyPAN CPAN Upload: oEdtk-0.7021 by DAUNAY http://metacpan.org/release/DAUNAY/oEdtk-0.7021 <buu> mauke: ping * prometheanfire hates json <fr00d> Hello <fr00d> I'm trying to install Moose into my homedirectory. To correctly build Moose with cpan I need the module ExtUtils::MakeMaker which I installed in my homedirectory, too. If I try to build Moose now it still uses <jmd> I'm having problems sending a single byte over a socket. Despite having set binmode AND autoflush AND explicitly flushing the socket, nothing appears to be transfered until I send a final "n". What am I doing w<Altreus> are you reading it wrong at the other end? <Altreus> fr00d: look at local::lib on cpan <Altreus> fr00d: it requires manual installation but tries to make that as simple as possible; then your toolchain should work from your homedir <jmd> Altreus: I'm not sure how one can read something "wrong". I just look at the bytes in the buffer. Nothing appears in that buffer until the n is sent. <Altreus> jmd: well for example if you're doing it is probably reading linewise, hence buffering on the way *in* <jmd> Well the other end is not a perl prog but a very simple (1 byte) buffer. <Altreus> unsure then, I'm afraid. Sockets are not my forté <prometheanfire> ah, that's better :D <prometheanfire> print $decoded_json->{access}->{token}->{id}; * prometheanfire is happy to figure out how to get values out of decoded json <Altreus> prometheanfire: if the json used => instead of : it would be perl <Altreus> hence, just treat it as hashrefs and arrayrefs <prometheanfire> Altreus: still, above my head, but I'm learning <prometheanfire> slowly <fr00d> Altreus: I need to install local::lib as root, right? <fr00d> I do not have root access to this machine. <Altreus> fr00d: no sir <Altreus> fr00d: you run it as your own user <Altreus> fr00d: follow the bootstrapping technique in its doc <prometheanfire> Altreus: how would you diferentiate between the diferent 'endpoints' here? http://dpaste.com/hold/699479/ <prometheanfire> I've tried $storageurl = $decoded_json->{access}->{serviceCatalog}->{endpoints}->{publicURL}; <Altreus> prometheanfire: ->{serviceCatalog} is an arrayref so you have ->[0] ->[1] etc <Altreus> the type of bracket is a clue. {} is hashy and [] is array-y <prometheanfire> Altreus: and if they are returned out of order? <Altreus> prometheanfire: not sure what you mean <Altreus> They are returned in whatever order the server deems correct, or no particular order if there isn’t one <prometheanfire> ok, so I’ll have to verify that name = cloudFiles before assigning the var <prometheanfire> kk :D <Altreus> ah you are looking for a named one <prometheanfire> ya, I <prometheanfire> I’m trying to get the publicURL from one of the endpoints <Altreus> So what you might do is say my $endpoints = $decoded_json->{access}->{serviceCatalog}; <Altreus> then my ($cloud_files_endpoint) = grep { $_->{name} eq ‘cloudFiles’ } @$endpoints <Altreus> thus finding the right hashref inside the arrayref (oh god the refs) <fr00d> *g* When building local::lib one of these many errors is: – ExtUtils::MakeMaker …too old. (6.30 < 6.31) <Altreus> fr00d: -_- <prometheanfire> Altreus: ya, all the nesting is making me dizzy <Altreus> prometheanfire: essentially, serviceCatalog refers to an array, so you grep that <Altreus> then the result you have from that, you can get ->{publicURL} <Altreus> prometheanfire: given that these endpoints have names, you’d think it would be another hash eh <prometheanfire> ya <fizzie> Altreus: There’s no ->{publicURL} in an element of the serviceCatalog. There’s just an ->{endpoints}, which is another array, in which there are elements that have a ->{publicURL}. <Altreus> fizzie: oh hell you are right <Altreus> prometheanfire: sorry, fizzie just pointed out it is $cloud_files_endpoint->[0]->{publicURL} <prometheanfire> I’m just confused, I picked up perl about 26 hours ago <Altreus> for some reason they all contain an arrayref with one hashref in <prometheanfire> well, let you in on a secret, soon customers will be able to choose their endpoint <Altreus> erk <Altreus> sounds like a bad idea <prometheanfire> it’s requested, and they will only get access to it via the API <prometheanfire> so I guess I’ll need to add support for that lol <jmd> I want a function which fills a scalar argument. Should I call is as my_func($arg) or my_func($arg) or what? <prometheanfire> hmm, that didn’t work <Altreus> jmd: presumably pass a ref to it if simply returning the result is not appropriate for whatever reason <jmd> I’m using the return value for another purpose. <prometheanfire> this accesses the correct value though print $decoded_json->{access}->{serviceCatalog}->[1]->{endpoints}->[0]->{publicURL};

© 2011 Techdot IRC Resources Suffusion theme by Sayontan Sinha