Re: Package Require getting "wrong version"



Donald G Porter <d...@xxxxxxxx> wrote:
As unsolicited advice, I'll note that no good program should contain
[package require http], since that's free to deliver either version 1.0
or version 2.* and of course those interfaces are completely different.
Use the 'requirement' argument(s) of [package require] to ask for the
command set your program actually uses.

tunity wrote:
I am not sure I follow your suggestion. Would you care to elaborate
on this?

If your program uses the commands provided by http 1.0, use the
command

package require http 1

If your program uses the commands provided by http 2.$N, use the
command

package require http 2.$N

where $N is as small as possible to get all the commands you use.

Omitting the 'requirement' argument(s) is simply a recipe for failure.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.



Relevant Pages

  • Re: Getting a file from http
    ... Is it is the same command with the ... HTTP version for this. ... You really should be doing "package require http" unless you are counting on ... I have been reading all man pages on http_get and cannot get it to ...
    (comp.lang.tcl)
  • Re: Getting a file from http
    ... You really should be doing "package require http" unless you are counting on some old behavior of the 1.x series. ... Is this the right command or do I use any other command? ... a token for that request - you can then use that token to get the return codes, meta data and also the data itself that was fetched, you can check the docs fdor this ...
    (comp.lang.tcl)
  • Re: Getting a file from http
    ... Is it is the same command with the ... HTTP version for this. ... You really should be doing "package require http" unless you are counting on ... I have been reading all man pages on http_get and cannot get it to ...
    (comp.lang.tcl)
  • Re: rename doesnt work in this case. why?
    ... % package require http ... can't rename "geturl": command doesn't exist ... Why is the command name resolution delayed? ... Because it is possible to require a package without actually loading the procedures that define that package. ...
    (comp.lang.tcl)
  • Re: Package Require getting "wrong version"
    ... or version 2.* and of course those interfaces are completely different. ... Use the 'requirement' argumentof [package require] to ask for the ... command set your program actually uses. ... Are you saying you can use http commands without loading it ...
    (comp.lang.tcl)