"It exists because there is an analogous method dir_list() in the Path::Class::File class that also returns the basename string, so this method lets someone call components() without caring whether the object is a file or a directory." . . . . .