apm_files_load (private)

 apm_files_load [ -force_reload ] [ -callback callback ] files

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

Load the set of files into the currently running Tcl interpreter.

Switches:
-force_reload (optional, boolean, defaults to "0")
Indicates if the file should be loaded even if it is already loaded in the interpreter.
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
files (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_libraries apm_load_libraries (private) apm_files_load apm_files_load apm_load_libraries->apm_files_load apm_callback_and_log apm_callback_and_log (public) apm_files_load->apm_callback_and_log apm_source apm_source (public) apm_files_load->apm_source db_release_unused_handles db_release_unused_handles (public) apm_files_load->db_release_unused_handles

Testcases:
No testcase defined.
Source code:
    # This will be the first time loading for each of these files (since if a
    # file has already been loaded, we just skip it in the loop below).
    global apm_first_time_loading_p
    set apm_first_time_loading_p 1

    global apm_current_package_key

    foreach file_info $files {
        lassign $file_info package_key path

        if { $force_reload_p || ![nsv_exists apm_library_mtime packages/$package_key/$path] } {
            if { [file exists "$::acs::rootdir/packages/$package_key/$path"] } {
                apm_callback_and_log $callback "Loading packages/$package_key/$path..."
                set apm_current_package_key $package_key

                apm_source "$::acs::rootdir/packages/$package_key/$path"

                # Release outstanding database handles (in case this file
                # used the db_* database API and a subsequent one uses
                # ns_db).
                db_release_unused_handles

                apm_callback_and_log $callback "Loaded packages/$package_key/$path."
                unset apm_current_package_key
            } else {
                apm_callback_and_log $callback "Unable to load packages/$package_key/$path - file is marked as contained in a package but is not present in the filesystem"
            }
        }
    }
    unset apm_first_time_loading_p
Generic XQL file:
packages/acs-tcl/tcl/apm-file-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-file-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-file-procs-oracle.xql

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