[EMAIL PROTECTED] wrote:
If you look at the previous mentioned site, you can see there is only one file, but it contains a lot of includes.
- a random function for the banners on top
- a file for the navigation on the left which includes a file for the date and a file for the counter (mysql database)
- the content pages with different files for the forms redirected per OS and type of Browser.
You seem to be talking about including chunks of the page, like server-side includes (SSI). That's not the same as doing a require/use on a module. Modules are for storing chunks of Perl code, not HTML.

You originally asked about why your subs from required files were not working. That's what Stas and Randal are telling you: you need to make them into real modules with "package" declarations. There are other ways to do it (like "do") but they are kludges.

If you're looking for something to help you manage splitting pages up into chunks of HTML, you should consider either using SSI (<!--#include virtual="/perl/example.cgi?argument=value" -->) or using HTML::Mason, which is based around that idea.

- Perrin



Reply via email to