package CROSS::DMOSS::Oracle;

use 5.006;
use strict;
use warnings;

=head1 NAME

CROSS::DMOSS::Oracle - The great new CROSS::DMOSS::Oracle!

=head1 VERSION

Version 0.01

=cut

our $VERSION = '0.01';

use File::Basename;

=head1 SYNOPSIS

Quick summary of what the module does.

Perhaps a little code snippet.

    use CROSS::DMOSS;

    my $ora = CROSS::DMOSS::Oracle->new();
    my $type = $ora->type($file);

=head1 EXPORT

A list of functions that can be exported.  You can delete this section
if you don't export anything, such as for a purely object-oriented module.

=head1 SUBROUTINES/METHODS

=head2 new

=cut

sub new {
	my ($class,$files) = @_;
	my $self = bless({}, $class);
	
	return $self;
}

=head2 type

=cut

sub type {
	my ($self,$file) = @_;

	my $type = '';
	if ($file->{basename} =~ m/read.*?me/i) {
		$type = 'README';
	}
	if ($file->{basename} =~ m/install/i) {
		$type = 'INSTALL';
	}
	if ($file->{path} =~ m/^man\//i) {
		$type = 'MAN';
	}
	if ($file->{path} =~ m/\.h$/i) {
		$type = 'HEADER';
	}
	if ($file->{path} =~ m/\.c$/i) {
		$type = 'C_SOURCE';
	}
	if ($file->{path} =~ m/\.(cpp|c\+\+)$/i) {
		$type = 'CPP_SOURCE';
	}
	if ($file->{path} =~ m/\.php$/i) {
		$type = 'PHP_SOURCE';
	}
	if ($file->{path} =~ m/\.html$/i) {
		$type = 'HTML';
	}
	if ($file->{path} =~ m/makefile/i) {
		$type = 'MAKEFILE';
	}

	return $type;
}

=head1 AUTHOR

Nuno Carvalho, C<< <smash at cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-cross-dmoss at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CROSS-DMOSS>.  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 CROSS::DMOSS


You can also look for information at:

=over 4

=item * RT: CPAN's request tracker (report bugs here)

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=CROSS-DMOSS>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/CROSS-DMOSS>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/CROSS-DMOSS>

=item * Search CPAN

L<http://search.cpan.org/dist/CROSS-DMOSS/>

=back


=head1 ACKNOWLEDGEMENTS


=head1 LICENSE AND COPYRIGHT

Copyright 2012 Nuno Carvalho.

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.


=cut

1; # End of CROSS::DMOSS
