Skip to content

Commit

Permalink
Fix some export issues
Browse files Browse the repository at this point in the history
- roles are our and thus visible through the exported Telemetry
- "is export" on them would only export the last part of the name
- constants are for internal use only, so should be my to prevent exporting
  • Loading branch information
lizmat committed Dec 29, 2017
1 parent 5f48c06 commit 38897d1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Telemetry.pm6
Expand Up @@ -6,7 +6,7 @@ use nqp;
my $snaps := nqp::create(IterationBuffer);

# Role for building instruments --------------------------
role Telemetry::Instrument is export {
role Telemetry::Instrument {

# Should return instantiated snap object
method snap() is raw { ... } # Typically just Snap.new
Expand All @@ -25,7 +25,7 @@ role Telemetry::Instrument is export {
}

# Role for creating an instrument snap -------------
role Telemetry::Instrument::Snap does Associative is export {
role Telemetry::Instrument::Snap does Associative {
has Mu $!data;
method data() is raw { $!data }

Expand Down Expand Up @@ -738,12 +738,12 @@ multi sub report(*%_ --> Str:D) {
}

# some constants for the %format list
constant NAME = 0; # short name
constant FORMAT = 1; # format (without % prefixed)
constant LEGEND = 2; # legend
constant HEADER = 3; # generated: column header
constant FOOTER = 4; # generated: column footer
constant DISPLAY = 5; # generated: code to execute to display
my constant NAME = 0; # short name
my constant FORMAT = 1; # format (without % prefixed)
my constant LEGEND = 2; # legend
my constant HEADER = 3; # generated: column header
my constant FOOTER = 4; # generated: column footer
my constant DISPLAY = 5; # generated: code to execute to display

sub prepare-format(@raw, %format --> Nil) is raw {

Expand Down

0 comments on commit 38897d1

Please sign in to comment.