| 1 | package App::PS1::Plugin::Face; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | # Created on: 2011-06-21 09:48:15 | ||||||||||||||
| 4 | # Create by: Ivan Wills | ||||||||||||||
| 5 | # $Id$ | ||||||||||||||
| 6 | # $Revision$, $HeadURL$, $Date$ | ||||||||||||||
| 7 | # $Revision$, $Source$, $Date$ | ||||||||||||||
| 8 | |||||||||||||||
| 9 | 1 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 10 | 1 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | 1 | ▶ | use Carp; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 12 | 1 | ▶ | use Data::Dumper qw/Dumper/; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | 1 | ▶ | use English qw/ -no_match_vars /; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 14 | |||||||||||||||
| 15 | 1 | our $VERSION = 0.08; | |||||||||||||
| 16 | |||||||||||||||
| 17 | 0 | ▶ | sub face { | ||||||||||||
|
Subroutine
face: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||
| 18 | 0 | my ($self, $options) = @_; | |||||||||||||
| 19 | 0 | my $exit_code = $self->exit; | |||||||||||||
| 20 | 0 | my ($happy, $sad) = (qw/:-) :-(/); | |||||||||||||
| 21 | |||||||||||||||
| 22 | 0 | ▶ | return ( 3, !$exit_code ? $self->colour('face_happy') . $happy : $exit_code ? $self->colour('face_sad') . $sad : $self->colour('red', 'red') . $sad ); | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 23 | } | ||||||||||||||
| 24 | |||||||||||||||
| 25 | 1 | 1; | |||||||||||||
| 26 | |||||||||||||||
| 27 | __END__ | ||||||||||||||