From f10a464d81beec54219bd47268a1c9785b28715b Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Thu, 9 Jan 2025 21:25:47 -0500 Subject: [PATCH] examples/improver now looks at the arguments --- MANIFEST | 1 + examples/improver | 4 ++-- lib/Grammar/Improver.pm | 1 + t/pod-cm.t | 10 ++++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 t/pod-cm.t diff --git a/MANIFEST b/MANIFEST index 2bb73ad..2382230 100644 --- a/MANIFEST +++ b/MANIFEST @@ -15,4 +15,5 @@ t/eol.t t/fixme.t t/manifest.t t/modules-used.t +t/pod-cm.t t/pod-coverage.t diff --git a/examples/improver b/examples/improver index 50bcef0..911840d 100755 --- a/examples/improver +++ b/examples/improver @@ -9,11 +9,11 @@ use Grammar::Improver; # Initialize the Grammar::Improver module my $improver = Grammar::Improver->new( - api_url => 'https://api.languagetool.org/v2/check', + # api_url => 'https://api.languagetool.org/v2/check', ); # Example text -my $text = 'This are a sample text with mistake.'; +my $text = join(' ', @ARGV); # Improve grammar my $corrected_text = $improver->improve_grammar($text); diff --git a/lib/Grammar/Improver.pm b/lib/Grammar/Improver.pm index d170835..7954be7 100644 --- a/lib/Grammar/Improver.pm +++ b/lib/Grammar/Improver.pm @@ -3,6 +3,7 @@ package Grammar::Improver; use strict; use warnings; use Carp; +use LWP::Protocol::https; use LWP::UserAgent; use JSON::MaybeXS; diff --git a/t/pod-cm.t b/t/pod-cm.t new file mode 100644 index 0000000..8977045 --- /dev/null +++ b/t/pod-cm.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; + +use Test::DescribeMe qw(author); +use Test::Needs 'Test::Pod::Spelling::CommonMistakes'; + +Test::Pod::Spelling::CommonMistakes->import(); +all_pod_files_ok();