Sunday, February 05, 2006

Finding nested ASDF components easily

The problem that prompted this excursion is that I wanted to get at a specific file in another ASDF package, and I didn't particularly care to know where the package is installed. Here's how the code started
(asdf:find-component 
  (asdf:find-component 
    (asdf:find-component nil :cl-catalyst)
    "templates") 
  "error")
There's a much easier way to do this kind of canonical component finding:
(reduce #'asdf:find-component 
        '(nil :cl-catalyst "templates" "error"))
Neat!!! It almost reminds me of logical pathnames...

0 Comments:

Post a Comment

<< Home