| 1 | package Launcher::Cascade::Printable; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Launcher::Cascade::Printable - a base class for printable objects | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | package MyPrintable; | ||
| 10 | use base qw( Launcher::Cascade::Printable ); | ||
| 11 | |||
| 12 | sub new { | ||
| 13 | |||
| 14 | ... | ||
| 15 | } | ||
| 16 | |||
| 17 | sub as_string { | ||
| 18 | |||
| 19 | my $self = shift; | ||
| 20 | ... | ||
| 21 | } | ||
| 22 | |||
| 23 | 1; | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This class serves as a base class for objects that might be included in a | ||
| 28 | launcher's errors list. | ||
| 29 | |||
| 30 | =cut | ||
| 31 | |||
| 32 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 33 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | |||
| 35 | 13 | ▶ | use overload '""' => 'as_string'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | |||
| 37 | =head2 Methods | ||
| 38 | |||
| 39 | =over 4 | ||
| 40 | |||
| 41 | =item B<as_string> | ||
| 42 | |||
| 43 | Subclasses of Launcher::Cascade::Printable should overload this method to | ||
| 44 | return a string representing their content. as_string() will be invoked when | ||
| 45 | the object is interpolated in a double-quoted string, or in any situation where | ||
| 46 | it is "stringified". | ||
| 47 | |||
| 48 | =cut | ||
| 49 | |||
| 50 | 0 | ▶ | sub as_string {} |
|
Subroutine
as_string: not called CC=1 SCAR=0.0
Pod
documented
| |||
| 51 | |||
| 52 | =back | ||
| 53 | |||
| 54 | =head1 SEE ALSO | ||
| 55 | |||
| 56 | L<Launcher::Cascade::Base>, L<Launcher::Cascade::ListOfStrings>. | ||
| 57 | |||
| 58 | =head1 AUTHOR | ||
| 59 | |||
| 60 | Cédric Bouvier C<< <cbouvi@cpan.org> >> | ||
| 61 | |||
| 62 | =head1 COPYRIGHT & LICENSE | ||
| 63 | |||
| 64 | Copyright (C) 2006 Cédric Bouvier, All Rights Reserved. | ||
| 65 | |||
| 66 | This program is free software; you can redistribute it and/or modify it under | ||
| 67 | the same terms as Perl itself. | ||
| 68 | |||
| 69 | =cut | ||
| 70 | |||
| 71 | 13 | 1; # end of Launcher::Cascade::Printable | |