Locating self | Dragonfly web framework
There was a young man who said, "Though it seems that I know that I know, what I would like to see is the 'I' that knows 'me', when I know that I know that I know." -- Alan Watts
The SET_DF_SELF function sets the DF_SELF and DF_SELF_DIR global symbols. As described in the section on creating your own routes, it is the responsibility of the route to call this function and therefore, if the route fails to perform this duty, these two symbols will be nil.
All other symbols listed here are guaranteed to be set to their proper values, and all of the routes that come with Dragonfly call SET_DF_SELF.
This symbol contains the absolute path (on the server) to the main file responsible for providing an response to the requested URL, for example:
Contains the absolute path to the (on the server) to the directory containing the file represented by DF_SELF. This is a handy symbol, often used by scripts in combination with the add-to-load-path function (see the Core API for more info).
DF_PAGE is useful when writing templates, it tells us the full resource portion of the URL. For example, here's it current value: