Skip to content

Commit

Permalink
Fix POD encoding errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jan 24, 2021
1 parent 2e04bf5 commit 56eb6ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 9 additions & 11 deletions README.md
Expand Up @@ -49,7 +49,7 @@ Autoload will do this for you as
Returns the string in the language requested in the parameter.
If that parameter is not given, the system language is used.

my $string = Lingua::String->new(en => 'boat', fr => 'bateau');
my $string = Lingua::String->new(en => 'boat', fr => 'bateau');
print $string->as_string(), "\n";
print $string->as_string('fr'), "\n";
print $string->as_string({ lang => 'en' }), "\n";
Expand All @@ -58,7 +58,7 @@ If that parameter is not given, the system language is used.

Turns the encapsulated strings into HTML entities

my $string = Lingua::String->new(en => 'study', fr => 'étude')->encode();
my $string = Lingua::String->new(en => 'study', fr => 'étude')->encode();
print $string->fr(), "\n"; # Prints étude

# AUTHOR
Expand All @@ -67,6 +67,9 @@ Nigel Horne, `<njh at bandsman.co.uk>`

# BUGS

There's no decode() (yet) so you'll have to be extra careful to avoid
double encoding.

# SEE ALSO

# SUPPORT
Expand Down Expand Up @@ -105,12 +108,7 @@ You can also look for information at:

Copyright 2021 Nigel Horne.

This program is released under the following licence: GPL2

# POD ERRORS

Hey! **The above document had some coding errors, which are explained below:**

- Around line 192:

Non-ASCII character seen before =encoding in ''étude')->encode();'. Assuming UTF-8
This program is released under the following licence: GPL2 for personal use on
a single computer.
All other users (for example Commercial, Charity, Educational, Government)
must apply in writing for a licence for use from Nigel Horne at \`&lt;njh at nigelhorne.com>\`.
6 changes: 4 additions & 2 deletions lib/Lingua/String.pm
Expand Up @@ -154,7 +154,7 @@ sub _get_language {
Returns the string in the language requested in the parameter.
If that parameter is not given, the system language is used.
my $string = Lingua::String->new(en => 'boat', fr => 'bateau');
my $string = Lingua::String->new(en => 'boat', fr => 'bateau');
print $string->as_string(), "\n";
print $string->as_string('fr'), "\n";
print $string->as_string({ lang => 'en' }), "\n";
Expand Down Expand Up @@ -187,9 +187,11 @@ sub as_string {

=head2 encode
=encoding utf-8
Turns the encapsulated strings into HTML entities
my $string = Lingua::String->new(en => 'study', fr => 'étude')->encode();
my $string = Lingua::String->new(en => 'study', fr => 'étude')->encode();
print $string->fr(), "\n"; # Prints &eacute;tude
=cut
Expand Down

0 comments on commit 56eb6ea

Please sign in to comment.