summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2011-05-22 23:29:25 -0700
committerJulian Blake Kongslie <jblake@omgwallhack.org>2011-05-22 23:29:25 -0700
commita166cebe20171257875e988b4c48eb4189bfd778 (patch)
tree06fb3b2de5b3a4768f3b0ccc85da5b39c954678d
parentb6110bc48b3f741c4a5c32fd924d99c9a0fe4d1d (diff)
downloadpiny-code-a166cebe20171257875e988b4c48eb4189bfd778.tar.gz
piny-code-a166cebe20171257875e988b4c48eb4189bfd778.zip
Fix path constraint failure in Piny::User (yes, really!)
:cry:
-rw-r--r--libpiny/lib/Piny/Environment.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpiny/lib/Piny/Environment.pm b/libpiny/lib/Piny/Environment.pm
index 06416b8..d48a921 100644
--- a/libpiny/lib/Piny/Environment.pm
+++ b/libpiny/lib/Piny/Environment.pm
@@ -9,8 +9,6 @@ package Piny::Environment;
use MooseX::Singleton;
use MooseX::StrictConstructor;
-use Piny::User;
-
# Attributes
has 'user' =>
@@ -25,6 +23,8 @@ has 'user' =>
sub _build_user {
my ( $s ) = @_;
+ eval "use Piny::User";
+
if ( defined $ENV{"SUDO_UID"} ) {
return Piny::User->new( uid => $ENV{"SUDO_UID"} );
} elsif ( defined $ENV{"SUDO_USER"} ) {