Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make Str/Numeric/gist on $*USER/GROUP work ok
masak++ for pointing out the error of my ways  :-)
  • Loading branch information
lizmat committed Jun 23, 2015
1 parent 7fbd54a commit e862714
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/core/Process.pm
Expand Up @@ -84,11 +84,14 @@ multi sub INITIALIZE_DYNAMIC('$*HOME') {
}
}

method Numeric { return Nil unless fetch(); +PROCESS::{$!name} }
method Str { return Nil unless fetch(); ~PROCESS::{$!name} }
method gist {
return Nil unless fetch();
PROCESS::{$!name} ~ ' (' ~ +PROCESS::{$!name} ~ ')';
multi method Numeric(IdFetch:D:) {
fetch() ?? +PROCESS::{$!name} !! Nil;
}
multi method Str(IdFetch:D:) {
fetch() ?? ~PROCESS::{$!name} !! Nil;
}
multi method gist(IdFetch:D:) {
fetch() ?? "{PROCESS::{$!name}} ({+PROCESS::{$!name}})" !! Nil;
}
}

Expand Down

0 comments on commit e862714

Please sign in to comment.