RE: Perl Question : How To Include?

by "Brian A. Sayrs" <sayrs(at)southwindsolutions.com>

 Date:  Mon, 31 Jan 2000 18:16:09 -0800
 To:  "'SDJThorin'" <sdjthorin(at)geocities.com>,
"hwg-techniques(at)hwg.org" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
That double colon structure (hmm...other languages call it the scoping =
operator), indicates projectname::function, so that wouldn't work.  =
Require statements are done at runtime, so I *believe* that it is done =
when the script gets to that line.  I've never tested it, because I =
always just declare everything at the beginning of my scripts.  =
Sorry...you've hit my limit of expertise, but I will check up on it.  :)

Brian

-----Original Message-----
From:	SDJThorin [SMTP:sdjthorin(at)geocities.com]
Sent:	Monday, January 31, 2000 5:38 PM
To:	hwg-techniques(at)hwg.org
Subject:	Re: Perl Question : How To Include?

Ok, didn't know about the "1;" thing, added that...

It now works!

Thanks!

I'll remember about that @INC thing too, wanted to have all the
formatting in one directory, but I was reading that use could
use something like :

	path structure :
		cgi-bin/wsformatting/wyldeside.pm

	format :
		require wsformatting::wyldeside;

or is this for something different, & are any external scripting
snippets done this way consider modules?

Now one last question, does it matter where you put the require
statements, and do they get compiled first, before the rest of
the program, or compiled/used where they're put?

ie :
	get require 1...
	get require 2...
( execute program )
	content
	...
	use require 1 content
	...
	content
	...
	use require 2 content
	...

or

( execute program )
	content
	...
	get & use require 1 content
	...
	content
	...
	get & use require 2 content
	...

Thanks, in advance,

	Stephen.

 ----------------------------------------------------------------
 |   /~\      ^| |^      /~\    The WyldeSide                   |
 |  /   /\   (o) (o)   /\   \       Web Designs & Programming,  |
 | |   |  | (  o~o  ) |  |   |      For Your Needs              |
 | \   \   \  ) O (  /   /   /  http://www.wyldeside.com        |
 ----------------------------------------------------------------

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.