diff options
Diffstat (limited to 'libpiny/lib/Piny')
-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"} ) { |