allow $self->{author} to be defined at ->new
Caleb Cushing [Thu, 22 Jul 2010 08:01:30 +0000 (04:01 -0400)]
this allows us to write scripts that get our author information from someplace
other than the environment.

Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>

lib/Catalyst/Helper.pm

index 5338cd0..57abaa7 100644 (file)
@@ -112,7 +112,7 @@ sub mk_app {
                                 : "#!$Config{perlpath}";
     $self->{scriptgen       } = $Catalyst::Devel::CATALYST_SCRIPT_GEN;
     $self->{catalyst_version} = $Catalyst::VERSION;
-    $self->{author          } = $self->{author} = $ENV{'AUTHOR'}
+    $self->{author          } ||= $ENV{'AUTHOR'}
       || eval { @{ [ getpwuid($<) ] }[6] }
       || 'Catalyst developer';