X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FImage%2FOpenALPR%2FPlateResult.pm;h=b24f899901da8da0e065fce32533fbc9cd61eba5;hb=4d4051da2ad5f86a0faad11d662e36882f7ed8be;hp=3fcca2dd446cff530241c7b5354e80a55aaa01f6;hpb=6765bc35d634346fb62423893eed48ecb0de1bc5;p=image-openalpr.git diff --git a/lib/Image/OpenALPR/PlateResult.pm b/lib/Image/OpenALPR/PlateResult.pm index 3fcca2d..b24f899 100644 --- a/lib/Image/OpenALPR/PlateResult.pm +++ b/lib/Image/OpenALPR/PlateResult.pm @@ -4,9 +4,10 @@ use 5.014000; use strict; use warnings; +use overload '""' => sub { shift->plate }, fallback => 1; use parent qw/Class::Accessor::Fast/; -our $VERSION = '0.001'; +our $VERSION = '0.001001'; __PACKAGE__->mk_ro_accessors(qw/plate confidence matches_template/); @@ -36,6 +37,7 @@ Image::OpenALPR::PlateResult - a license plate, as identified by OpenALPR =head1 SYNOPSIS my $plate = $alpr->recognise('t/example.jpg'); + say $plate; # ZP36709 say $plate->plate; # ZP36709 say $plate->confidence; # 92.373634 my @coords = $plate->coordinates; # [306, 351], [476, 351], [476, 384], [306, 384] @@ -53,7 +55,8 @@ identified by OpenALPR. It offers the following methods: =item $plate->B The plate number that has the highest confidence value (likelihood of -being correct). +being correct). An object of this class will stringify to the return +value of this method. =item $plate->B