apm_load_libraries (private)

 apm_load_libraries [ -force_reload ] [ -packages packages ] \
    [ -callback callback ] [ -procs ] [ -init ] [ -test_procs ] \
    [ -test_init ]

Defined in packages/acs-tcl/tcl/apm-procs.tcl

Loads all -procs.tcl (if $procs_or_init is "procs") or -init.tcl files into the current interpreter for installed, enabled packages. Only loads files which have not yet been loaded. This is intended to be called only during server initialization, since it loads libraries only into the running interpreter, as opposed to in *all* active interpreters.

Switches:
-force_reload (optional, boolean, defaults to "0")
-packages (optional)
-callback (optional, defaults to "apm_dummy_callback")
-procs (optional, boolean)
-init (optional, boolean)
-test_procs (optional, boolean)
-test_init (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_packages apm_load_packages (public) apm_load_libraries apm_load_libraries apm_load_packages->apm_load_libraries apm_package_install apm_package_install (public) apm_package_install->apm_load_libraries apm_enabled_packages apm_enabled_packages (public) apm_load_libraries->apm_enabled_packages apm_files_load apm_files_load (private) apm_load_libraries->apm_files_load apm_get_package_files apm_get_package_files (public) apm_load_libraries->apm_get_package_files db_release_unused_handles db_release_unused_handles (public) apm_load_libraries->db_release_unused_handles

Testcases:
No testcase defined.
Source code:
    set file_types [list]
    if { $procs_p } {
        lappend file_types tcl_procs
    }
    if { $init_p } {
        lappend file_types tcl_init
    }
    if { $test_procs_p } {
        lappend file_types test_procs
    }
    if { $test_init_p } {
        lappend file_types test_init
    }

    if { $packages eq "" } {
        set packages [apm_enabled_packages]
    }

    # Scan the package directory for files to source.
    set files [list]
    foreach package $packages {

        set paths [apm_get_package_files -package_key $package -file_types $file_types]

        foreach path [lsort $paths] {
            lappend files [list $package $path]
        }
    }

    # Release all outstanding database handles (since the file we're sourcing
    # might be using the ns_db database API as opposed to the new db_* API).
    db_release_unused_handles
    apm_files_load -force_reload=$force_reload_p -callback $callback $files
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

[ hide source ] | [ make this the default ]
Show another procedure: