Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


perl: Am I doing something evil that I should know about in this customisable script?

This topic is 5612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, I am working on an engine to a web based browser game in perl. The goal is to make a rather decent engine that allows all the tools people need to code for their browser games (file locking, session handling, form handling, etc.), in a nice easy to carry bundle. The main reason I am making this is to show that I do know perl well enough to atleast attempt to pull something like this off. The process flow for the engine is simple. There are four groups of tasks that each page is expected to do, Data_gathering, Input_cleaning, Data_processing, and Display (in that order). There is a section inwhich these processes can store their information necessary for the next functions. Tasks simply are function references stored in a Hash of Lists, with the named parts of the hash of lists being the type of task that is being done. The idea is that the real functionality will be done in a series of modules that are added ontop of this basic expandable script. Modules can add a script to boot_script.pvar, and the files they are enclosed in into modules_included.pl. Those files are meant for the user to configure the game using Year Neo''s engine. And are ultimately intended to be web updatible. I am intending to have this one script serve up all the files used by the game, via mod_rewrite, which means that it will be opening a different script each time, but having it go through client.pl. The scripts will be Perl, or YearNeo''s scripting langauge (Jokingly called "VariaMLs"), and will be your basic CMS scripts. I am just wondering if I am doing anything really overly that evil, or against perl''s basic ideas? the script in question. Yes, it is syntactically clean (though I only tested with perl -c client.pl) A couple things that worry me:
  • use of $AUTOLOAD in the main namespace. Will that cause problems? The idea is to access $process_vars{name}, in a manner similar to $main::name, and simplify how modules make use of main namespace variables. Is that going to cause problems
  • I am attempting to have modules_conf.pl include modules used by this program executed via the ''do'' keyword. Is that going to cause problems, or will it work on things other than Data::Dumper output?
  • Nested loops. I''ve ran into problems with these with PHP a lot of times. Generally with PHP, you can only have one loop going at a time... how similar is that with Perl?
Thank you in advance.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!