=item class2env($class);
-Returns the enviroment name for class.
+Returns the environment name for class.
MyApp becomes MYAPP
My::App becomes MY_APP
sub class2tempdir {
my $class = shift || '';
my $create = shift || 0;
- my @parts = split '::', lc $class;
+ my @parts = split '::', lc $class;
my $tmpdir = dir( File::Spec->tmpdir, @parts )->cleanup;
- if ( $create && ! -e $tmpdir ) {
+ if ( $create && !-e $tmpdir ) {
eval { $tmpdir->mkpath };
- if ( $@ ) {
+ if ($@) {
Catalyst::Exception->throw(
- message => qq/Couldn't create tmpdir '$tmpdir', "$@"/
- );
+ message => qq/Couldn't create tmpdir '$tmpdir', "$@"/ );
}
}
{
$home = $subdir;
}
+
# clean up relative path:
# MyApp/script/.. -> MyApp
my ($lastdir) = $home->dir_list( -1, 1 );
my $class = shift;
my $actions = [];
eval '$actions = $class->_action_cache';
-
- if ( $@ ) {
- Catalyst::Exception->throw(
- message => qq/Couldn't reflect actions of component "$class", "$@"/
- );
+
+ if ($@) {
+ Catalyst::Exception->throw( message =>
+ qq/Couldn't reflect actions of component "$class", "$@"/ );
}
-
+
return $actions;
}