| MojoMojo documentation | Contained in the MojoMojo distribution. |
MojoMojo::Model::Themes - support for Thematic styles
List available themes.
Marcus Ramberg <mramberg@cpan.org>
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
| MojoMojo documentation | Contained in the MojoMojo distribution. |
package MojoMojo::Model::Themes; use strict; use parent 'Catalyst::Model';
sub list { my $self = shift; my $theme_dir = MojoMojo->path_to('root', 'static', 'themes'); my @themes; opendir TDH, $theme_dir; while (my $theme = readdir TDH){ next if $theme =~ /^\.{1,2}/; push @themes, $theme; } closedir TDH; MojoMojo->log->info("Available themes in " . $theme_dir . ": @themes") if MojoMojo->debug; return @themes }
1;