The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojo::Leds - Leds aka Light Environment (emi) for Development System based on Mojolicious

GitHub last commit Travis tests

VERSION

version 1.05

SYNOPSIS

DESCRIPTION

Leds is a Mojolicious app to use a filesystem similiar to classical web site

DIFFERENCES WITH MOJOLICIOUS

Mojolicious applications use a filesystem structure closer to a CPAN distribution which is not (IMHO) intuitive.

This is a classical Mojolicios applications

myapp                      # Application directory
|- script                  # Script directory
|  +- my_app               # Application script
|- lib                     # Library directory
|  |- MyApp.pm             # Application class
|  +- MyApp                # Application namespace
|     +- Controller        # Controller namespace
|        +- Example.pm     # Controller class
|- public                  # Static file directory (served automatically)
|  |- index.html           # Static HTML file
|  +- css                  # Static CSS file
|     +- example           # Static CSS for "Example" controller
|       +- welcome.css     # Static CSS for "welcome" action
|  |- js                   # Static JS file
|     +- example           # Static js for "Example" controller
|        +- welcome.js     # Static js for "welcome" action
+- templates               # Template directory
   |- layouts              # Template directory for layouts
   |  +- default.html.ep   # Layout template
   +- example              # Template directory for "Example" controller
      +- welcome.html.ep   # Template for "welcome" action

And, as you can see, the "page" welcome has its controller in lib/MyApp/Controller/Example.pm, the html code in templates/example/welcome.html.ep, the CSS code in public/css/example/welcome.css and its JS code in public/js/example/welcome.js.

In Mojo::Leds the scructure is quite different myapp # Application directory |- script # Script directory | +- my_app # Application script |- lib # Library directory | |- MyApp.pm # Application class |- www # DocumentRoot :-) |- public # Static files directory (served automatically) | |- index.html # Static Home page HTML | |- css # Static CSS file | + app.css # Global Static CSS file | +- js # Static JS file | + app.js # Global Static JS file |- layouts | +- default.html.ep # Layout template +- welcome # Directory for welcome page |- page.pm # Controller for welcome page |- page.html.ep # Template for welcome page |- page.css # CSS File for welcome page +- page.js # JS File for welcome page

and here, controller, html code, css and js are all inside www/example/ directory.

BUGS/CONTRIBUTING

Please report any bugs through the web interface at https://github.com/EmilianoBruni/Mojo-Leds/issues If you want to contribute changes or otherwise involve yourself in development, feel free to fork the Git repository from https://github.com/EmilianoBruni/Mojo-Leds/.

SUPPORT

You can find this documentation with the perldoc command too.

perldoc Mojo::Leds

AUTHOR

Emiliano Bruni <info@ebruni.it>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Emiliano Bruni.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.