José Alves de Castro > Text-Beautify > Text::Beautify

Download:
Text-Beautify-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.08   Source  

NAME ^

Text::Beautify - Beautifies text

SYNOPSIS ^

  use Text::Beautify;

  $text = "badly written text ,,you know ?"

  $new_text = beautify($text);
  # $new_text now holds "Badly written text, you know?"

  # or

  $text = Text::Beautify->new("badly written text ,,you know ?");
  $new_text = $text->beautify;

  # and also

  enable_feature('repeated_punctuation'); # enables the feature
  disable_feature('trailing_space');      # disables the feature

  @features_enables = enabled_features();

  @all_features = features();

  enable_all();
  disable_all();

DESCRIPTION ^

Beautifies text. This involves operations like squeezing double spaces, removing spaces from the beginning and end of lines, upper casing the first character in a string, etc.

You can enable / disable features with enable_feature / disable_feature. These commands return a true value if they are successful.

To know which features are beautified, see FEATURES

FEATURES ^

All features are enabled by default

METHODS ^

new

Creates a new Text::Beautify object

beautify

Applies all the enabled features

enabled_features

Returns a list with the enabled features

features

Returns a list containing all the features

enable_feature

Enables a feature

disable_feature

Disables a feature

enable_all

Enables all features

disable_all

Disables all features

TO DO ^

AUTHOR ^

Jose Castro, <cog@cpan.org>

COPYRIGHT & LICENSE ^

Copyright 2004 Jose Castro, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: