Show
Ignore:
Timestamp:
05/09/08 15:55:50 (7 months ago)
Author:
charsbar
Message:

Acme-CPANAuthors: made ->authors context sensitive and added pods to show how to use (actually you don't need to scrape the authors list)

Location:
lang/perl/Acme-CPANAuthors/trunk
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Acme-CPANAuthors/trunk/Changes

    r3606 r11294  
    11Revision history for Acme-CPANAuthors 
     2 
     30.02 2008/05/** 
     4  - made Acme::CPANAuthors::(Specific)->authors context sensitive. 
    25 
    360.01 2007/12/26 
  • lang/perl/Acme-CPANAuthors/trunk/MANIFEST

    r3606 r11294  
    99t/00_load.t 
    1010t/01_basic.t 
     11t/02_standalone.t 
    1112t/99_pod.t 
    1213t/99_podcoverage.t 
  • lang/perl/Acme-CPANAuthors/trunk/lib/Acme/CPANAuthors.pm

    r3606 r11294  
    66use Acme::CPANAuthors::Utils qw( cpan_authors cpan_packages ); 
    77 
    8 our $VERSION = '0.01'; 
     8our $VERSION = '0.02'; 
    99 
    1010sub new { 
     
    131131    $kwalitee = $authors->kwalitee('ISHIGAKI'); 
    132132 
     133  If you don't like this interface, just use specific authors list. 
     134 
     135    use Acme::CPANAuthors::Japanese; 
     136 
     137    my %authors = Acme::CPANAuthors::Japanese->authors; 
     138 
     139    # note that ->author is context sensitive. 
     140    # however, you can't write this without dereference 
     141    # as "keys" checks the type (actually, the number) of args. 
     142    for my $name (keys %{ Acme::CPANAuthors::Japanese->authors }) { 
     143      print Acme::CPANAuthors::Japanese->authors->{$name}, "\n"; 
     144    } 
     145 
    133146=head1 DESCRIPTION 
    134147 
  • lang/perl/Acme-CPANAuthors/trunk/lib/Acme/CPANAuthors/Register.pm

    r3606 r11294  
    1010  { 
    1111    no strict 'refs'; 
    12     *{"$caller\::authors"} = sub { %authors }; 
     12    *{"$caller\::authors"} = sub { wantarray ? %authors : \%authors }; 
    1313  } 
    1414} 
     
    3434  1; 
    3535 
     36  # then you can get authors list like these. 
     37  # note that ->authors is context sensitive) 
     38 
     39  my %hash    = Acme::CPANAuthors::YourGroup->authors; 
     40  my $hashref = Acme::CPANAuthors::YourGroup->authors; 
     41 
    3642=head1 DESCRIPTION 
    3743 
    3844This is used to register Pause IDs and real names of those who belong to your country/local perl mongers group/your company etc. 
     45 
     46=head1 SEE ALSO 
     47 
     48L<Acme::CPANAuthors> 
    3949 
    4050=head1 AUTHOR