view release on metacpan or  search on metacpan

lib/App/Grepl/  view on Meta::CPAN

package App::Grepl::Base;

use warnings;
use strict;
use Scalar::Util 'reftype';

=head1 NAME

App::Grepl::Base - Common methods for App::Grepl (internal only)

=head1 VERSION

Version 0.01


our $VERSION = '0.01';


Common methods for App::Grepl

=head1 METHODS

=head2 Class Methods

=head3 C<new>

 my $grepl = App::Grepl->new;

Common constuctor for C<App::Grepl> classes.  If an argument is passed, it
must be a hashref.

All initialization should be via an overridden C<_initialize> method.


sub new {
    my ( $class, $arg_for ) = @_;
    $arg_for ||= {};

    my $reftype = reftype $arg_for || 'SCALAR';
    unless ( 'HASH' eq $reftype ) {
        $class->_croak("Argument to new must be a hashref, not a ($reftype)");

    my $self = bless {} => $class;
    return $self;

sub _croak {
    my ( $class, $message ) = @_;
    require Carp;

=head1 AUTHOR

Curtis Poe, C<< <ovid at> >>

=head1 BUGS

Please report any bugs or feature requests to
C<bug-app-grepl at>, or through the web interface at
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc App::Grepl::Base

You can also look for information at:

=over 4

=item * AnnoCPAN: Annotated CPAN documentation


=item * CPAN Ratings


=item * RT: CPAN's request tracker


=item * Search CPAN





Copyright 2007 Curtis Poe, all rights reserved.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.


 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.043 second using v1.00-cache-1.14-grep-28634ff-cpan-2688f6af7ff )