Book-Collate

 view release on metacpan or  search on metacpan

lib/Book/Collate/Report.pm  view on Meta::CPAN

  my $character_count = 0;
  foreach my $word ( $self->words() ){
    $character_count += length($word);
  }
  return $character_count / $self->word_count ;
}


=head2 _generate_fry_stats

Gives a percentage of Fry list words used against the total unique words used.

=cut

sub _generate_fry_stats {
  my $self = shift;
  my %word_list = $self->word_list($self->{_words});
  my %custom_words; 
  if ( defined( $self->{_custom_words} ) ){
    %custom_words = %{$self->{_custom_words} };
  }

lib/Book/Collate/Writer/Report.pm  view on Meta::CPAN


=head1 EXPORT

A list of functions that can be exported.  You can delete this section
if you don't export anything, such as for a purely object-oriented module.

=head1 SUBROUTINES/METHODS

=head2 _generate_fry_stats

Gives a percentage of Fry list words used against the total unique words used.

=cut

sub _generate_fry_stats {
  my ( $word_list, $custom_word_list ) = @_;
  my %word_list = %{$word_list};
  my %custom_word_list = %{$custom_word_list};
  my %fry_words = %Book::Collate::Words::fry;
  my %used_words;
  my %missed;



( run in 0.532 second using v1.01-cache-2.11-cpan-709fd43a63f )