[Bps-public-commit] Prophet branch, master, updated. 424407556dc5a47442c93c764b4f1b99be1bcb8e

clkao at bestpractical.com clkao at bestpractical.com
Wed Apr 15 02:59:42 EDT 2009


The branch, master has been updated
       via  424407556dc5a47442c93c764b4f1b99be1bcb8e (commit)
      from  5d20be612e9f5902cb9f8d812ea00623694e3624 (commit)

Summary of changes:
 lib/Prophet/Server.pm |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 424407556dc5a47442c93c764b4f1b99be1bcb8e
Author: Chia-liang Kao <clkao at clkao.org>
Date:   Wed Apr 15 14:59:34 2009 +0800

    want file::sharedir for default static root.

diff --git a/lib/Prophet/Server.pm b/lib/Prophet/Server.pm
index e67f379..5538fa5 100644
--- a/lib/Prophet/Server.pm
+++ b/lib/Prophet/Server.pm
@@ -77,6 +77,9 @@ sub prophet_static_root {
         $PROPHET_STATIC_ROOT = File::Spec->catdir( Prophet::Util->updir( $INC{'Prophet.pm'} ),
             "..", "share", "web", "static" );
 
+        eval { require File::ShareDir; 1 }
+            or die "requires File::ShareDir to determine default static root";
+
         $PROPHET_STATIC_ROOT
             = File::Spec->catfile( File::ShareDir::dist_dir('Prophet'), 'web/static' )
             if ( !-d $PROPHET_STATIC_ROOT );
@@ -104,6 +107,10 @@ sub app_static_root {
 
         my $dist = ref($self->app_handle);
         $dist =~ s/::/-/g;
+
+        eval { require File::ShareDir; 1 }
+            or die "requires File::ShareDir to determine default static root";
+
         $APP_STATIC_ROOT
             = File::Spec->catfile( File::ShareDir::dist_dir($dist), 'web/static' )
             if ( !-d $APP_STATIC_ROOT );

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list