Re: our..

2005-11-27 Thread Bob Showalter
Lou Hernsen wrote: ok after reading about "our" fact: I use all global vars in the main program. conclusion I need to list all the vars in the module as our in main my $foo in mod our $foo this will allow the vars to be used by both programs? No. A variable declared with "my" is only access

RE: Need help with making a Modules

2005-11-27 Thread Charles K. Clarkson
Lou Hernsen wrote: : I am trying to create a module that will print the Stats of the : player of my on line game. : all it should do is take the vars, do some calulations and print the : HTML : since the Stats is used in every time i don't want to duplicate it in : each

Modules update

2005-11-27 Thread Lou Hernsen
since $Speed is the output i have to call on the sub in the mod as $Speed = stats::Speed($Spy,$Army,$Hero,$Horse,$Wagon); and pass the vars to the mod and in the mod return $Speed; I also discovered the mod will print HTML code with out returning it. Now i have to experiment with the workings of

our..

2005-11-27 Thread Lou Hernsen
ok after reading about "our" fact: I use all global vars in the main program. conclusion I need to list all the vars in the module as our in main my $foo in mod our $foo this will allow the vars to be used by both programs? Lou -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Need help with making a Modules

2005-11-27 Thread Lou Hernsen
I am trying to create a module that will print the Stats of the player of my on line game. all it should do is take the vars, do some calulations and print the HTML since the Stats is used in every time i don't want to duplicate it in each program. The main program has all your players vars loade

Re: Need help with making a Modules

2005-11-27 Thread Lou Hernsen
This small piece of the Stats sub calculates the speed at which you are traveling. I have in the main program. use stats and I call on it just like a regular sub Speed(); or should it be stats::Speed; When I call on the entire mod, i want the whole thing to run. I could just put all the sub

RE: Need help with making a Modules

2005-11-27 Thread Charles K. Clarkson
Lou Hernsen wrote: : I am studying modules.. I am seeking a mentor to help. What do you mean by "module"? I ask because many people have very different ideas about what one is. For example, some people think about a library. require 'my_perl_module.pl";

Re: Need help with making a Modules

2005-11-27 Thread David Dorward
On Sat, 2005-11-26 at 19:48 -0800, Lou Hernsen wrote: > I am studying modules.. perldoc perlmod (and perlmodlib, and perlmodstyle) > Do I need to pass vars into the mod? No, but you might need to pass them into subroutines you define in the module (depending on what you want to do). > Do i nee

Need help with making a Modules

2005-11-27 Thread Lou Hernsen
I am studying modules.. I am seeking a mentor to help. I have very simple questions like ... Do I need to pass vars into the mod? Do i need to declare vars in the mod? What is "our"? something like "my" and "local"? Do I need to return vars? The code I am writing creates part of a web page, so I c