🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

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

Started by
-1 comments, last by DakeDesu 20 years, 11 months ago
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.
[ Six Hour Game Contest | ( Thread | Blog | Wiki | 6hour Bio ) ][ Website | (Blog | Gallery ) ]

This topic is closed to new replies.

Advertisement