Skip to content

Commit

Permalink
draft module
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Jun 10, 2024
1 parent fe1eb02 commit 0d72a6d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions lib/Spellbook/Parser/Nozaki.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package Spellbook::Parser::Nozaki {
use strict;
use warnings;
use JSON;
use Mojo::File;

sub new {
my ($self, $parameters) = @_;
my ($help, $file, @result);

Getopt::Long::GetOptionsFromArray (
$parameters,
"h|help" => \$help,
"f|file=s" => \$file,
);

if ($file) {
my $load_file = Mojo::File -> new($file);
my $data = $load_file -> slurp();
my $content = decode_json($data);

print $content;
}

if ($help) {
return "
\rParser::Nozaki
\r=====================
\r-h, --help See this menu
\r-t, --target \n\n";
}

return 0;
}
}

1;

0 comments on commit 0d72a6d

Please sign in to comment.