Myco::Util::Strings - a Myco entity class
0.01
$Revision$ $Date$
use Myco; # Constructors. See Myco::Base::Entity for more. my $obj = Myco::Util::Strings->new; # Accessors. my $value = $obj->get_fooattrib; $obj->set_fooattrib($value); $obj->save; $obj->destroy;
Blah blah blah... Blah blah blah... Blah blah blah... Blah blah blah blah blah... Blah blah...
Constructor, accessors, and other methods -- as inherited from Myco::Base::Entity.
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) 2004 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::Base::Entity, Myco, Tangram, Class::Tangram, mkentity
To install Myco, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Myco
CPAN shell
perl -MCPAN -e shell install Myco
For more information on module installation, please visit the detailed CPAN module installation guide.