RECENT POSTS

P5-dancer2-plugin-path-class

May 26, 2018

List a directory using Path::Class

Dancer2PluginPathClass exports the keyword ‘ls’ returning a PathClass object.

The ‘ls’ keyword also sets some ‘vars’.

  • ls_name The basename of the path
  • ls_cdup The parent of the request path
  • ls_dirs A list of subdirectories if the path is a directory object
  • ls_files A list of files or just one file if the path is a file object

WWW http//search.cpan.org/dist/Dancer2-Plugin-Path-Class/