apm_load_packages (public)
apm_load_packages [ -force_reload ] \ [ -load_libraries_p load_libraries_p ] \ [ -load_queries_p load_queries_p ] [ -packages packages ]
Defined in packages/acs-tcl/tcl/apm-procs.tcl
Load Tcl libraries and queries for the packages with given keys into the current interpreter. Will load Tcl tests when the acs-automated-testing package is enabled.
- Switches:
- -force_reload (optional, boolean, defaults to
"0"
)- Reload Tcl libraries even if they are already loaded.
- -load_libraries_p (optional, defaults to
"1"
)- Switch to indicate if Tcl libraries in (-procs.tcl and -init.tcl) files should be loaded. Defaults to true.
- -load_queries_p (optional, defaults to
"1"
)- Switch to indicate if xql query files should be loaded. Default true.
- -packages (optional)
- A list of package_keys for packages to be loaded. Defaults to all enabled packages. These packages, along with the packages they depend on, will be loaded in dependency-order using the information provided via the "provides" and "requires" definitions.
- Author:
- Peter Marklund
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set enabled_packages [apm_enabled_packages] if { $packages eq "" } { set packages $enabled_packages } set packages_to_load [list] foreach package_key $packages { foreach package_to_load [::apm_package_load_libraries_order $package_key] { # # Never add packages, which are not enabled. # if {$package_to_load ni $packages_to_load && $package_to_load in $enabled_packages} { lappend packages_to_load $package_to_load } } } # Should acs-automated-testing tests be loaded? set load_tests_p [apm_load_tests_p] # Load *-procs.tcl files if { $load_libraries_p } { apm_load_libraries -force_reload=$force_reload_p -packages $packages_to_load -procs } # Load up the Queries (OpenACS, ben@mit.edu) if { $load_queries_p } { apm_load_queries -packages $packages_to_load } # Load up the Automated Tests and associated Queries if necessary if {$load_tests_p} { apm_load_libraries -force_reload=$force_reload_p -packages $packages -test_procs apm_load_queries -packages $packages_to_load -test_queries } if { $load_libraries_p } { # branimir: acs-lang needs to be initialized before anything else # because there are packages whose *-init.tcl files depend on it. apm_load_libraries -force_reload=$force_reload_p -init -packages acs-lang set p [lsearch $packages_to_load acs-lang] if {$p > -1} { set unique_packages [lreplace $packages_to_load $p $p] } else { set unique_packages $packages_to_load } apm_load_libraries -force_reload=$force_reload_p -init -packages $unique_packages } # Load up the Automated Tests initialization scripts if necessary if {$load_tests_p} { apm_load_libraries -force_reload=$force_reload_p -packages $packages_to_load -test_init }Generic XQL file: packages/acs-tcl/tcl/apm-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/apm-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/apm-procs-oracle.xql