apm_source (public)

 apm_source __file [ errorVarName ]

Defined in packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl

Sources $__file in a clean environment, returning 1 if successful or 0 if not. Records that the file has been sourced and stores its mtime in the nsv array apm_library_mtime

errorVarName (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm_source apm_source (test acs-bootstrap-installer) apm_source apm_source test_apm_source->apm_source ad_file ad_file (public) apm_source->ad_file ad_make_relative_path ad_make_relative_path (public) apm_source->ad_make_relative_path apm_bootstrap_load_file apm_bootstrap_load_file (private) apm_bootstrap_load_file->apm_source apm_files_load apm_files_load (private) apm_files_load->apm_source db_qd_get_fullname db_qd_get_fullname (public) db_qd_get_fullname->apm_source packages/acs-automated-testing/www/admin/init-file-resource.tcl packages/acs-automated-testing/ www/admin/init-file-resource.tcl packages/acs-automated-testing/www/admin/init-file-resource.tcl->apm_source packages/acs-automated-testing/www/admin/rerun.tcl packages/acs-automated-testing/ www/admin/rerun.tcl packages/acs-automated-testing/www/admin/rerun.tcl->apm_source

Source code:
    if {$errorVarName ne ""} {
        upvar $errorVarName errors
    } else {
        array set errors [list]

    if { ![ad_file exists $__file] } {
        ns_log "Error" "Unable to source $__file: file does not exist."
        return 0

    set r_file [ad_make_relative_path $__file]

    # Actually do the source.
    if { [catch { source $__file } errorMsg] } {
        set backTrace $::errorInfo
        ns_log "Error" "Error sourcing $__file:\n$backTrace"
        set package_key ""
        regexp {/packages/([^/]+)/} $__file -> package_key
        lappend errors($package_key$r_file $backTrace
        return 0

    nsv_set apm_library_mtime $r_file [ad_file mtime $__file]

    return 1
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: