| |
| |
| |
|
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 29 30 31 32 33 34 35 36
Comments:
<0> cpan: Acme::Importer <1> Ani-_: huh? <0> The_SB: a reason to more not to use @EXPORT. <2> Ani-_: doesn't exist, sorry :/ <2> I thought it was too silly to upload <0> The_SB: if you do then they see you call a subroutine without defining it somewhere... <0> Nothing is too silly for Acme. :) <3> mauke, pointer to place of memory <2> not really <2> do you know how to use references in perl? <0> In the very, very, very end yes <4> Ani-_, is the message about global vars thrown due to use strict; right? <5> TehKewl1: regarding your irc colours question you send \x03 + the colour that you want. <6> Ani-_: OK thanks a lot - I see. (now I will ave to think of a clever way to tell vim to help me with that) <3> mauke, approximately <3> but this is not clear yet
<2> Sir_J: ok. which line is the error message referring to? <0> yango: yes and no. It's because you are using use strict and didn't tell perl that you wanted to use that global variable. You just used it. <7> "Need help trying to fix error" (235 lines, 10.3K) at http://sial.org/pbot/18298 and "Need help trying to fix error - library file" (408 lines, 9.7K) at http://sial.org/pbot/18299 with errors at http://sial.org/pbot/18300 <7> I need some help trying to fix an error <7> with the function get_param in the library file <3> return $self->{'A'} if ref $self->{'A'} eq "A"; <2> right. where does that line use a hash reference? <7> But I really cant figure why its giving me that error, and why its not being initialized <0> Ugly code. Really ugly. <8> i'm having issues trying to build html::tidy <8> i've installed libtidy <0> $x="*!*\x40VT.user.gamesurge"; push(@host_masks,$x); undef($x); ==> what's wrong with push @host_masks, "*!*\x40VT.user.gamesurge"; <0> or even: @host_masks = ("host1", "host2", "..."); <3> mauke, probably --> $self->{'A'} <-- eq "A" <2> Sir_J: right <2> Sir_J: $self must contain a hash reference for that line to work <2> Sir_J: the error message says $self is a string, not a reference <7> The first file is compiled thorugh a C++ preprocessor, like varioables from C++ to a Perl file <3> but why ? <2> Sir_J: where do you set $self? <3> in new sub of course <2> Sir_J: wrong <3> my $self = shift; <7> set_next_parameter works, but get_param doesnt <2> yes. that's line 43 in sub getInstance <3> mauke, but this is wrong <2> what is wrong? <3> I want to have object <2> no, you don't <3> now this error is clear <2> see my explanation above: SingletonForA->getInstance() calls SingletonForA::getInstance("SingletonForA") <0> I can't say how glad I am that I gave up 30 minutes ago. :) <3> but if I cal SingletonForA->new there are two different objects <2> right <3> with them own copy of $self0>{'i'} <3> mauke, I want to avoid it <2> they shoulnd't have a $self->{'i'} <3> and use --> new SingletonForA <-- construction <2> dude, I gave you a working getInstance function <3> mauke, why not <2> why don't you use it? <3> mauke, why not $self->{'i'} = <global variable > <3> ? <2> because ->{i} belongs to A, not SingletonForA <2> wtf? <0> package SingletonForA; my $obj; sub new { $obj ||= bless {}; $obj; } <3> but it referes to global variable <3> mauke, I mean <2> Ani-_: but that doesn't have a getInstance, it can't be a singleton!!!! <3> try to imagine that we have $i <-- global variable <2> no, thanks <3> and $self->{'i'} == $i <3> will it works ? <2> you're not making any sense <0> mauke: Do you really care? As in, do you really want to spend the entire week explaining what happens to Sir_J? <2> maybe <3> :) <0> Good luck in that case. <0> You'll need it. <3> oke-oke guys
<3> I see you <3> I can't do that I want by using way I want <3> I'll use mauke our example with getInstance <0> Exactly. YOU can't. Someone else can. <2> uh, my example does exactly what you want <3> yesm but bot by using way I'd like to do it :) <2> how so? <3> I shouldn't want it <0> tr/?//d; # be smart... :) <2> what? <3> thatnk for having patience <2> I'm actually waiting for an answer <2> in what way does my code not do what you want? <3> I will use only native perl solution inspite of that is not simpathize me <2> hello? <5> mauke++ <0> mauke++ <0> Sir_J-- <3> Ani-_, ? <3> mauke, ahh, sorry your code does what I want but not by using way I imagine that <2> Sir_J: it's exactly equivalent to your C++ code except for the static pointer <2> perl doesn't have a "static" keyword so I used outer lexicals instead <2> the rest is 100% the same <9> perl has state though <3> yeah, but I've expected something like new{ static $self->{'someobject'} = blah-bah; } getInstance { return $self->{'object'} } <2> 5.10 maybe <2> Sir_J: then you don't even understand the C++ code <3> oke-oke <5> GumbyBRAIN: be Sir_J <10> you can, but your dad was better. <2> Sir_J: int a[10]; a[0] = 1; a[1] = 2; static a[2] = 100; wtf? <0> mauke, doesn't that makes sense? :) <0> as in, wouldn't it make it impossible to change a[2]? :/ <11> Hmmmmmm, I want Perl 6 <5> wankit <12> Perl 6 doesn't get an upset stomach, it gets upset at its stomach. <13> What's name of perl package that does equivalent of 'expect' ? <5> Expect <2> Ani-_: uh, no. that's totally not what static does <13> BinGOs: it's not by default in the perl installation, right ?O <5> core: Expect <12> Expect will be added by christmas <5> Nope. it is not a core module. You will have to install it, either using CPAN, or very your distribution/OS packaging system. <5> s/very/via/ <3> mauke, your example doesn't compile <2> Sir_J: what's the error? <3> probably --> static a[2] = 100; <-- is wrong <2> oh, that one <3> conflicts with previous declaration <2> well, you suggested static $self->{'someobject'} = blah-bah; <2> it makes about the same amount of sense <3> I wanted to use agregation <3> one object contains another <2> and that's the problem <7> anyone that can help me? <0> Stop using things you don't know. And yes this also includes Perl. <2> Sir_J: there's only one A object (see: Singleton), so it doesn't make sense that each outer object should have its own A <0> VT: perhaps you should start by writing it yourself and not trying to (automatically) convert C++ code to Perl? <2> see also the C++ example where getInstance is static (so no this or $self or whatever) <7> Its just the variables that are transferred over <13> cpan script bombed doing 'install Expect' <3> mauke, your right <13> do i need to run cpan as root ? <7> I did write the library, but with some help, I just cant figure out why $self->{param}->[0] or [1] isnt working properly <0> VT: and it does so in a very ugly and unreadable way. (Or atleast IMO) <13> What do I do with this cpan error rafb.net/paste/results/hLtUiV26.html <12> The paste hLtUiV26 has been copied to http://erxz.com/pb/2021 <0> eMishGLX: what module are you installing? <13> Expect <0> eMishGLX: can you try: install LWP ?
Return to
#perl or Go to some related
logs:
#bash gentoo live cds ipw2200 #lgp redhot patch mythtv libexpat.so xfce4 emerge #bash mysql function Unknown system variable aticonfig workspace grep epxressions x64 no_timer_check redhat
|
|