From a166cebe20171257875e988b4c48eb4189bfd778 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 22 May 2011 23:29:25 -0700 Subject: Fix path constraint failure in Piny::User (yes, really!) :cry: --- libpiny/lib/Piny/Environment.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpiny/lib') 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"} ) { -- cgit v1.2.3