1package Object::Quick;
2use strict;
3use warnings;
4
5use Mock::Quick::Object;
6use Mock::Quick::Method;
7use Mock::Quick::Util;
8use Carp qw/croak carp/;
9
10
11sub import {
12    carp "Object::Quick is depricated, use Mock::Quick instead.";
13    my $class = shift;
14    my $caller = caller;
15    my ( @names, %args );
16    for my $i ( @_ ) {
17        if( $i =~ m/^-/ ) {
18            $args{$i}++;
19        }
20        else {
21            push @names => $i;
22        }
23    }
24
25    if ( $args{'-obj'} ) {
26        $names[0] ||= 'obj';
27        $names[1] ||= 'method';
28        $names[2] ||= 'clear';
29    }
30
31    croak <<EOT if $args{'-class'};
32'-class' is no longer supported as of V1.0
33if you use this functionality send me an email at exodist7\@gmail.com
34I will add it in.
35EOT
36
37    inject( $caller, $names[0], sub { Mock::Quick::Object->new( @_ )}) if $names[0];
38    inject( $caller, $names[1], sub(&) { Mock::Quick::Method->new( @_ )}) if $names[1];
39    inject( $caller, $names[2], sub { \$Mock::Quick::Util::CLEAR }) if $names[2];
40}
41
421;
43
44__END__
45
46=head1 NAME
47
48Object::Quick - Depricated, see L<Mock::Quick>
49
50=head1 DESCRIPTION
51
52Legacy interface to L<Mock::Quick>
53
54=head1 AUTHORS
55
56Chad Granum L<exodist7@gmail.com>
57
58=head1 COPYRIGHT
59
60Copyright (C) 2011 Chad Granum
61
62Mock-Quick is free software; Standard perl licence.
63
64Mock-Quick is distributed in the hope that it will be useful, but WITHOUT ANY
65WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
66PARTICULAR PURPOSE. See the license for more details.
67