Skip to content
Browse files

Added simple perl6-based facter binary

  • Loading branch information...
1 parent f52dbf1 commit a8ed313f087ae9ede9401bc042baa06ad8f940e7 @cosimo committed
Showing with 22 additions and 0 deletions.
  1. +22 −0 bin/facter
View
22 bin/facter
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl6
+
+use v6;
+use Facter;
+
+my %facts;
+my $facter = Facter.new;
+my @name = @*ARGS;
+
+if @name {
+ for @name -> $name {
+ %facts{$name} = $facter.fact($name).value;
+ }
+}
+else {
+ %facts = $facter.to_hash;
+}
+
+for %facts.kv -> $name, $value {
+ say $name, " => ", $value;
+}
+

0 comments on commit a8ed313

Please sign in to comment.
Something went wrong with that request. Please try again.