Re: how to assign to var in module from script

From: Bob (ngmsg_at_ausitn.rr.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 01:49:26 GMT


"John Bokma" <postmaster@castleamber.com> wrote in message
news:40c907a5$0$207$58c7af7e@news.kabelfoon.nl...
> Bob wrote:
>
> > "John Bokma" <postmaster@castleamber.com> wrote in message
>
> [ snip ]
>
> >>Since you are not able to read documentation, I doubt it.
> >
> > no I can read it...just like I can read your posts...both are no fun for
me
> > to read...so give it up.
>
> So you are lazy?

no I am simply not _trying_ to learn perl okay? I just had the 1
question... no need for a lecture..I used to use it, but then I moved on to
other things okay...

>
> >>>do you know me?
> >>
> >>No, which I consider to be good ;-)
> >
> > why?
>
> I read a lot between the lines. OTOH maybe you are a nice guy. People
> are different on Usenet than in real life.

no I am the same in real life...if someone gives me attitude when I am
simply asking a question...out loud..not even to anyone in specific...then I
feel I have to contest...I feel like, "if you don't have something nice to
say, stfu" didn't your mom ever tell you that?

>
> >>>do you think perl is the
> >>>only kind of programming?
> >>
> >>Nop, I never stated such a thing. In other languages it's also not
> >>a good idea to make a class or module variable public.
> >
> > as I said there is no choice.
>
> Yes, later. Not in your OP, worse
>
> "package myvartest;"
>
> made me (and I guess not only me) assume you did write this module.
> So... this means you made up the code in your post? That is always a bad
> idea.

I was trying to simplify it for you...I think the module is like 13k+....
all I needed to know was "how to assign to var in module from script" ...you
know... kind of like the title of my post?? did you skip that part? how am
I assigning to it from my script if I only pass a value to a function in a
module....the actual assigning is done inside the module then...let me be
frank...R.T.F. title of the post okay??

>
> >>>ummm...that would have to be in the module ...
> >>
> >>Yes.
> >
> > well unacceptable....
>
> And you should have stated that in your original post.

read the title and body of my post...it says nothing about passing variables
to a function inside a module.

>
> >>Why not? Also, if there are restrictions to your questions it's
> >>considered wise to include those restrictions in your question. I can
> >>guess a lot (like lack of skills), but not the restrictions of your
> >>environment.
> >>
> >
> >
> > I put those restrictions in the first question...
>
> "below is a module, I need to change the value of $testvar from a
> perlscript,
> so that when I call checkit(); it prints the new value. How do I
> assign to
> a variable in a module from a script."
>
> Without the ? it's a bit hard, but can you please point to this
> restriction? The module you posted looked like some test stuff, written
> by a beginner, not some 3rd party module you can not change.
please read the title of the question again...untill you get it...but
really..you thought that was a real module...no, that was a test...in case
you didn't know, that module wasn't really usefull, cause it isn't even as
good as print;

>
> > can't you read...I posted
> > how the module looked...
>
> No, you wrote "below is a module". Normally people post *actual* code
> snippets, not *** they made up (ok, that happens, and then people flame
> them).

the snippet was that simple though almost exactly like what I posted....I am
still not posting it, because you have to have un/pw to get it, but it just
declared 4 global vars and then did stuff that was outside the snippet.
maybe I should have put #for debug purposes after sub checkit() then it
would have been more clear...but is that what you keep posting back about?

>
> > I did not say 'oh, btw, you can change the module'
>
> Since it looked like you made it (and that still seems the case), I
> guessed you could change it, and I am sure everyone reading your
> post would have thought you asked a question about *that* piece of code.
>
> Not "hey, I have a module I can not change, it looks a bit like this
> piece of code etc.". Write clear questions if you want correct answers.
>

look, like I said .. I got my answer someplace else...the first post was
what $obj::var="foo";
and if you don't believe me, I don't care, but I am also not posting where I
got the answer, cause that is "my backyard" a little...but I don't post like
11k post there by any stretch.

> > ... all I asked about was how to do it from outside.
>
> Which is often a bad idea.
>

yeah...but your assumptions were wrong in this case...maybe you should ask
more questions before you come off so tough.

> >>>work! You acted like you had some solution, but in fact you have only
> >>>wasted my time.
> >>
> >>You wasted *my* time, and of many others with a badly written question
> >>which you could have solved yourself in 5 seconds with some RTFM.
> >
> > you still never posted the link in perldoc or the -q
>
> perldoc perlmod, 3rd paragraph.

okay that could have saved x posts, and you would have still looked cool.

>
> >>Your "experience" with other programming languages should at least have
> >>taught you RTFM as basic skill.
> >
> > did you not see the I don't care post? It is easier for you guys that
do it
> > all the time to answer, then for me to spend my time looking it up....if
you
> > don't like it, stop "answering" questions for free.
>
> LOL. Bad troll.

are you troll bait then LOL.

>
> > responded...another thing a programmer should not do...jump to
> > conclusions...which you like to do.
>
> Alas, you keep proving my jumping is right :-D.

keep jumping, I'll keep shooting.

>
> >>>if you don't like doing that for me,
> >>
> >>I like to do that, if you *pay* me.
> >
> > ha ha ha well, if answering ng question is your job, I hope you got
someone
> > supporting you.
>
> Providing solutions is my job, yes.

what and you do this for fun?!? have you ever heard of s&m I think you
might like the m part.