exists -proc -> exists -command

`exists -command` subsumes `exists -proc`

This test is generally checking whether the command exists, rather than some proc that is overriding it.

Currently `class` is a proc but this may not always be so.
This commit is contained in:
df 2020-12-14 14:06:48 +00:00 committed by HummyPkg
parent 0060e47db5
commit f16399ec2f
12 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
require system.class plugin
if {![exists -proc class]} { package require oo }
if {![exists -command class]} { package require oo }
class dir {}
class browse {}

View File

@ -1,5 +1,5 @@
if {![exists -proc class]} { package require oo }
if {![exists -command class]} { package require oo }
class clipboard {
path "/tmp/webif.cb"

View File

@ -1,7 +1,7 @@
source /mod/webif/lib/setup
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
require settings.class progressbar rsv.class mwildcard svc.class

View File

@ -1,5 +1,5 @@
if {![exists -proc class]} { package require oo }
if {![exists -command class]} { package require oo }
class pkg {
name ""

View File

@ -1,6 +1,6 @@
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
class queue {
id -1

View File

@ -1,8 +1,8 @@
source /mod/webif/lib/setup
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -proc binary]} { package require binary }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
if {![exists -command binary]} { package require binary }
require settings.class system.class plugin svc.class
set binaryfields aulEventToRecordInfo

View File

@ -1,6 +1,6 @@
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
if {![file exists /mod/etc/webif.db]} {
set ::settingsdb [sqlite3.open /mod/etc/webif.db]

View File

@ -1,7 +1,7 @@
source /mod/webif/lib/setup
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
require system.class
class svc {

View File

@ -3,9 +3,9 @@ source /mod/webif/lib/setup
package require xconv
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -proc binary]} { package require binary }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
if {![exists -command binary]} { package require binary }
class system {}

View File

@ -1,7 +1,7 @@
if {![exists -proc class]} { package require oo }
if {![exists -proc pack]} { package require pack }
if {![exists -proc xconv]} { package require xconv }
if {![exists -command class]} { package require oo }
if {![exists -command pack]} { package require pack }
if {![exists -command xconv]} { package require xconv }
source /mod/webif/lib/setup
require system.class tvdb.class classdump

View File

@ -1,8 +1,8 @@
source /mod/webif/lib/setup
package require cgi
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }
if {![exists -command class]} { package require oo }
if {![exists -command sqlite3.open]} { package require sqlite3 }
require system.class xml.class
set ::tvdb::apikey 1764335F804A5A91

View File

@ -2,7 +2,7 @@
# From https://wiki.tcl-lang.org/page/Parsing+XML
# Keith Vetter 2004-03-01
if {![exists -proc class]} { package require oo }
if {![exists -command class]} { package require oo }
class xml {
xml ""