diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-05-22 23:29:25 -0700 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-05-22 23:29:25 -0700 |
commit | a166cebe20171257875e988b4c48eb4189bfd778 (patch) | |
tree | 06fb3b2de5b3a4768f3b0ccc85da5b39c954678d | |
parent | b6110bc48b3f741c4a5c32fd924d99c9a0fe4d1d (diff) | |
download | piny-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.pm | 4 |
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"} ) { |