#!/usr/bin/env perl
# PODNAME: classfile
# ABSTRACT: Executing File::ShareDir class_file with the arguments

$|=1;

use strict;
use warnings;
use File::ShareDir ':ALL';

die "need class" unless $ARGV[0];

my $module = $ARGV[0];

eval {
  (my $file = $module) =~ s|::|/|g;
  require $file.'.pm';
  $module->import();
  1;
} or do {
  die $@;
};

print class_file(@ARGV)."\n";

__END__

=pod

=head1 NAME

classfile - Executing File::ShareDir class_file with the arguments

=head1 VERSION

version 0.001

=head1 AUTHOR

Torsten Raudssus <torsten@raudss.us>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Torsten Raudssus.

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

=cut
