Role::HasMessage::Errf man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Role::HasMessage::ErrfUser Contributed Perl DocumentaRole::HasMessage::Errf(3)

NAME
       Role::HasMessage::Errf - a thing with a String::Errf-powered message

VERSION
       version 0.005

SYNOPSIS
       In your class...

	 package Errfy;
	 use Moose;

	 with 'Role::HasMessage::Errf';

	 has payload => (
	   is  => 'ro',
	   isa => 'HashRef',
	   required => 1,
	 );

       Then...

	 my $thing = Errfy->new({
	   message => "%{error_count;error}n encountered at %{when}t",
	   payload => {
	     error_count => 2,
	     when	 => time,
	   },
	 });

	 # prints: 2 errors encountered at 2010-10-20 19:23:42
	 print $thing->message;

DESCRIPTION
       Role::HasMessage::Errf is an implementation of Role::HasMessage that
       uses String::Errf to format "sprintf"-like message strings.  It adds a
       "message_fmt" attribute, initialized by the "message" argument.	The
       value should be a String::Errf format string.

       When the provided "message" method is called, it will fill in the
       format string with the hashref returned by calling the "payload"
       method, which must be implemented by the including class.

       Role::HasMessage::Errf is a parameterized role.	The "default"
       parameter lets you set a default format string or callback.  The "lazy"
       parameter sets whether or not the "message_fmt" attribute is lazy.
       Setting it lazy will require that a default is provided.

AUTHOR
       Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE
       This software is copyright (c) 2010 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.14.1			  2010-10-28	     Role::HasMessage::Errf(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net