Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9d6519e73321e5674c71b86d891901d21c0a9d26
Ticket: 3061814fffffffffffffffffffffffffffffffff
Tcl use invalid pattern for module name.
User & Date: andreas_kupries on 2010-09-08 23:54:13
Changes

  1. closedate changed to: "2010-09-08T16:54:13"
  2. closer changed to: "andreas_kupries"
  3. icomment:
    
    
    allow_comments - 1
    
    (Ad 1) The manpage is out of date needs an update ... Done.
    
    (Ad 2) This is, IMHO, not a bug.
    
    First note, from the manpage "Before the search is started ... All occurrences of “::” in the package name are replaced by the appropriate directory separator character for the platform we are on". So, a package a::b::c is transformed to a/b/c, and the search code then looks for
    <base>/a/b/*.tm (<base> is my placeholder here for the paths to searchs for modules).
    
    Now note that to get the package name back from a path the code converts the / back to :: ... See the code 'set pkgfilename ...' in tm.tcl. At that point we have a string like "a::b::x-X.y.tm" and this is compared against the pkgpattern. As the string contains ':' the regex has to allow this.
    
    Now if you have a package with a name like "z::a:b", using a single colon ... Then the search is for "<base>/z/*.tm" and as "a:b-1.tm" is an illegal file name on Windows it cannot be constructed and won't be found. That the pkgpattern would accept it is immaterial at this point. Windows has already prevented you from creating the file you wanted. I do not have to constrain my pattern to handle something which cannot occur. And on unix, where this such a file is possible the acceptance by the pattern is also correct.
    
    
  4. login: "andreas_kupries"
  5. mimetype: "text/plain"
  6. resolution changed to: "Fixed"
  7. status changed to: "Closed"
  8. username: "andreas_kupries"