Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

string::rewriteprefix(3) [mojave man page]

String::RewritePrefix(3)				User Contributed Perl Documentation				  String::RewritePrefix(3)

NAME
String::RewritePrefix - rewrite strings based on a set of known prefixes VERSION
version 0.007 SYNOPSIS
use String::RewritePrefix; my @to_load = String::RewritePrefix->rewrite( { '' => 'MyApp::', '+' => '' }, qw(Plugin Mixin Addon +Corporate::Thinger), ); # now you have: qw(MyApp::Plugin MyApp::Mixin MyApp::Addon Corporate::Thinger) You can also import a rewrite routine: use String::RewritePrefix rewrite => { -as => 'rewrite_dt_prefix', prefixes => { '' => 'MyApp::', '+' => '' }, }; my @to_load = rewrite_dt_prefix( qw(Plugin Mixin Addon +Corporate::Thinger)); # now you have: qw(MyApp::Plugin MyApp::Mixin MyApp::Addon Corporate::Thinger) METHODS
rewrite String::RewritePrefix->rewrite(\%prefix, @strings); This rewrites all the given strings using the rules in %prefix. Its keys are known prefixes for which its values will be substituted. This is performed in longest-first order, and only one prefix will be rewritten. If the prefix value is a coderef, it will be executed with the remaining string as its only argument. The return value will be used as the prefix. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2013-10-15 String::RewritePrefix(3)

Check Out this Related Man Page

Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadatUsermContributed Perl DocumeJifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata(3pm)

NAME
Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata - ActorMetadata mixin SYNOPSIS
package MyApp::Model::CoffeeShop; use Jifty::DBI::Schema; use MyApp::Record schema { # custom column definitions }; use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on and updated_by DESCRIPTION
SCHEMA
This mixin adds the following columns to the model schema: created_by created_on updated_on updated_by METHODS
# XXX: pod coverage should count parent classes. this pod is useless register_triggers Adds the triggers to the model this mixin is added to. register_triggers_for_column before_create Sets "created_by", "created_on", "updated_on" and "updated_by" based on the current user and time. after_set update "updated_on" and "updated_by" based on the current user and current time. current_user_can Rejects creation unless there's a current_user. current_user_is_owner import to be more flexible, we allow some configurations like: e.g. use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata user_class => 'Foo::Model::Principal', map => { created_by => 'creator', created_on => 'created' } current valid args are: user_class => 'Foo::Model::User' class that you want created_by and updated_by to be refers_to map => { created_by => 'creator', ... } the real column name you want to use. this also controls whether a column will be added or not. i.e. if the hashref is { created_by => 'creator', created_on => 'created' }, then columns 'updated_by' and 'updated_on' will not be added. perl v5.14.2 2011-02-08 Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata(3pm)
Man Page