| File: | blib/lib/App/Project/Doctor/Check/Role.pm |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | time | code |
|---|---|---|---|---|---|---|
| 1 | package App::Project::Doctor::Check::Role; | |||||
| 2 | ||||||
| 3 | # --------------------------------------------------------------------------- | |||||
| 4 | # Backward-compatibility shim. | |||||
| 5 | # | |||||
| 6 | # This file used to define a Moose-style role interface for check plugins. | |||||
| 7 | # The role model was replaced with a simpler traditional OO base class | |||||
| 8 | # (App::Project::Doctor::Check::Base). This shim is kept so that any | |||||
| 9 | # external code that loaded Check::Role by name continues to work. | |||||
| 10 | # --------------------------------------------------------------------------- | |||||
| 11 | ||||||
| 12 | # Enforce strict variable scoping to catch typos at compile time. | |||||
| 13 | 2 2 2 | 4019 2 36 | use strict; | |||
| 14 | # Emit runtime warnings for common mistakes (undef in string, etc.). | |||||
| 15 | 2 2 2 | 7 4 83 | use warnings; | |||
| 16 | # Make all built-in I/O functions throw exceptions instead of returning errors. | |||||
| 17 | 2 2 2 | 6 3 14 | use autodie qw(:all); | |||
| 18 | ||||||
| 19 | # Inherit everything from Check::Base. The -norequire flag tells 'parent' | |||||
| 20 | # NOT to automatically 'require' Check::Base; we do that ourselves in Doctor.pm | |||||
| 21 | # before calling ->new on any check plugin. | |||||
| 22 | 2 2 2 | 4480 2 16 | use parent -norequire, 'App::Project::Doctor::Check::Base'; | |||
| 23 | ||||||
| 24 | # Module version used by CPAN and 'use Module 0.02' guards. | |||||
| 25 | our $VERSION = '0.02'; | |||||
| 26 | ||||||
| 27 | # Return true so Perl knows this file loaded without errors. | |||||
| 28 | 1; | |||||
| 29 | ||||||