Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -r1.114.2.3 -r1.114.2.4 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 27 Mar 2019 09:07:03 -0000 1.114.2.3 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 27 Mar 2019 10:40:29 -0000 1.114.2.4 @@ -1979,17 +1979,17 @@ ad_proc -public apm::metrics { -package_key:required -file_type:required - -array:required + -array } { Return some code metrics about the files in package $package_key. This - will return an array of 3 items: + will return an array or dict containing at least the following items: - This will be placed in the array variable that is provided - to this proc.

Valid file_type's:

+ When the array is provided, it will be used for setting the result. + Otherwise a dict with the metrics information is returned. This proc is cached. @@ -2011,8 +2013,12 @@ @param file_type See options above @param array variable to hold the array that will be returned } { - upvar $array metrics - array set metrics [util_memoize [list apm::metrics_internal $package_key $file_type]] + set data [util_memoize [list apm::metrics_internal $package_key $file_type]] + if {[info exists array]} { + upvar $array metrics + array set metrics $data + } + return $data } ad_proc -private apm::metrics_internal {