#!/usr/bin/env perl

use warnings;
use strict;

use Data::Dumper;
use RPi::WiringPi;

if (@ARGV) {
    _help() if $ARGV[0] eq '-h' || $ARGV[0] eq '--help';
}

my $pi = RPi::WiringPi->new;
$pi->cleanup;

my $meta = $pi->metadata;

print "\nCurrent state of shared data storage:\n\n";

print Dumper $meta;

sub _help {
    print <DATA>;
    exit;
}

__DATA__

pimetadata

Using Data::Dumper, print to STDOUT the entire data structure
stored within the shared memory storage location.

Options:

    -h|--help   Show this help screen

