
Myco::Util::Strings - a Myco entity class

use Myco::Util::Strings;

A simple shell to store oft-used string-manipulation routines.

my $attribute_label = Myco::Util::Strings->pretty_print('person_last_name');
my $do_these_words_match = $attribute_label eq 'Person Last Name';
Attempts to prettify any string.
my $title = Myco::Util::Strings->get_last_uri_word('/o/person/search/');
my $nice_uri_last_word = $title eq 'Search';
Attempts to prettify and return the last word in a base uri.
my %hash = ( a => 1, b => 2, c => 3 );
my $javascript_hash = Myco::Util::Strings->get_javascript(\%hash);
my $hashes_match = $javascript_hash eq "{ 'a' : 1, 'b' : 2, 'c' : 3 }";
Makes use of Data::Dumper to stringify a Perl data structure and format it for use as a javascript data structure.
my $strfmt = Myco::Util::Strings->new;
my $abbr = $strfmt->get_abbr_classname('Myco::Animal::GiantSquid');
my $isa_squid = $abbr eq 'Giant Squid';
Parses out a nice class name.
my $strfmt = Myco::Util::Strings->new; my $random_string = $strfmt->rand_str(6); # like 13d0vr
Generates a psudo-random alphanumeric string of n-length.
my $password = Myco::Util::Strings->ssha_crypt('hush-hush', $salt);
Encrypt a string using the SSHA (Secure Salted Hash Algorithm). Salt is optional, and will be generated in its absence.

Copyright (c) 2006 the myco project. All rights reserved. This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Myco::Util::Strings::Test, Myco::Entity, Myco, Tangram, Class::Tangram, myco-mkentity