Acme-RandomQuote-Base

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    print $foo->get_random_quote();

=head2 new

Creates a new Acme::RandomQuote::Base object.

    my $foo = Acme::RandomQuote::Base->new( 'file' );

=head2 get_random_quote

Returns a random line from the selected file.

    print $foo->get_random_quote();

=head1 AUTHOR

Diogo Neves, C<< <dafneves at mangaru.net> >>

=head1 COPYRIGHT & LICENSE

Copyright 2008 Diogo Neves, all rights reserved.

lib/Acme/RandomQuote/Base.pm  view on Meta::CPAN

=cut

sub new {
    my ( $self, $filename ) = @_;

    return bless \$filename => $self;
}

=head2 get_random_quote

Returns a random line from the selected file.

    print $foo->get_random_quote();

=cut

sub get_random_quote {
    my $self = shift;

    my $rl = File::RandomLine->new( $$self );



( run in 0.568 second using v1.01-cache-2.11-cpan-49f99fa48dc )