| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package CPAN::Index::API::Role::HavingFilename; | 
| 2 |  |  |  |  |  |  | { | 
| 3 |  |  |  |  |  |  | $CPAN::Index::API::Role::HavingFilename::VERSION = '0.007'; | 
| 4 |  |  |  |  |  |  | } | 
| 5 |  |  |  |  |  |  |  | 
| 6 |  |  |  |  |  |  | # ABSTRACT: Provides 'filename' attribute | 
| 7 |  |  |  |  |  |  |  | 
| 8 | 2 |  |  | 2 |  | 1198 | use strict; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 59 |  | 
| 9 | 2 |  |  | 2 |  | 9 | use warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 45 |  | 
| 10 | 2 |  |  | 2 |  | 10 | use Path::Class (); | 
|  | 2 |  |  |  |  | 2 |  | 
|  | 2 |  |  |  |  | 26 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 2 |  |  | 2 |  | 9 | use Moose::Role; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 10 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | requires 'default_location'; | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | has filename => ( | 
| 17 |  |  |  |  |  |  | is         => 'ro', | 
| 18 |  |  |  |  |  |  | isa        => 'Str', | 
| 19 |  |  |  |  |  |  | required   => 1, | 
| 20 |  |  |  |  |  |  | lazy_build => 1, | 
| 21 |  |  |  |  |  |  | ); | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | sub _build_filename { | 
| 24 | 9 |  |  | 9 |  | 14 | my $self = shift; | 
| 25 | 9 |  |  |  |  | 44 | return Path::Class::file($self->default_location)->basename; | 
| 26 |  |  |  |  |  |  | } | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | 1; | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | __END__ | 
| 32 |  |  |  |  |  |  | =pod | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | =head1 NAME | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | CPAN::Index::API::Role::HavingFilename - Provides 'filename' attribute | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =head1 VERSION | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | version 0.007 | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | =head1 REQUIRES | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | =head2 deafult_location | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | Class method that returns a string specifying the path to the default location | 
| 47 |  |  |  |  |  |  | of this file relative to the repository root. | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | =head1 PROVIDES | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | =head2 filename | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | Name of the current file - defaults to the basename of the path specified | 
| 54 |  |  |  |  |  |  | in C<default_location>; | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | =head1 AUTHOR | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | Peter Shangov <pshangov@yahoo.com> | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | This software is copyright (c) 2012 by Venda, Inc.. | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | This is free software; you can redistribute it and/or modify it under | 
| 65 |  |  |  |  |  |  | the same terms as the Perl 5 programming language system itself. | 
| 66 |  |  |  |  |  |  |  | 
| 67 |  |  |  |  |  |  | =cut | 
| 68 |  |  |  |  |  |  |  |