[[PageOutline]]
= TOL Packages =
TOL packages are objects of type NameBlock containinig libraries, tools and 
examples writen in TOL in order to help users to make an efficient and 
standarized use of the language.

== Using TOL Packages ==
The only requirement to use them is open source cross-platform sofware 
[http://www.gnu.org/software/wget/ wget] that is distributed with almost 
all linux systems. A Windows binary setup is available 
[http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe here].

In order to load a package like !GraphTools in your code you only need to 
write 
{{{
#Require GraphTools;
}}}

This command creates an object of type NameBlock with the same name in the 
global scope, so that subsequent calls from the same session does 
absolutely nothing. The command returns nothing in the current scope, ie is 
transparent to the browser !TolBase and for the contents of the sets, 
instances, etc. The first time you use a package in a computer it will be 
automatically installed from this public repository.

If you want to upgrade to a newer version of a package you can call global 
function
{{{
Real UpgradePackage(Text PackageName)
}}}
In order to upgrade all local packages you can write
{{{
Real UpgradePackage("all")
}}}

== Building TOL Packages ==

The package has a '''root directory''' whose name follows the CamelCase 
convention, and it will have a '''main file''' with the same name and 
extension {{{.tol}}} containing just one object of type NameBlock that is 
the '''engine''' of the package. From the NameBlock it will be loaded any 
file situated inside the root directory in an arbitrary hierarchy of 
subdirectories.

Usually the directory have also an special directory called '''test''' where 
there standard TOL checking programs tha can be used also as examples of use. 

Some complex packages can require specific documentation that will be put in
'''doc''' directory.

When a package requires to load another packages the engine NameBlock will
have the corresponding {{{#Require }}} orders before the first member.
This information will be stored by the NameBlock and will be attached to the
compressed OIS in order to be loaded before the caller package when a user
requires it.

== Available TOL Packages ==
