Fey::Object::Mock::Schema - Mock schema class subclass of Fey::Object::Schema


Fey-ORM-Mock documentation Contained in the Fey-ORM-Mock distribution.

Index


Code Index:

NAME

Top

Fey::Object::Mock::Schema - Mock schema class subclass of Fey::Object::Schema

VERSION

Top

version 0.05

DESCRIPTION

Top

When you use Fey::ORM::Mock to mock a schema, this class will become your schema class's immediate parent. It in turn inherits from Fey::Object::Schema.

You will probably never need to use any of this class's methods, however.

METHODS

Top

This class provides the following methods:

$class->Recorder

Returns the Fey::ORM::Mock::Recorder object associated with the schema.

$class->SetRecorder($recorder)

Sets the Fey::ORM::Mock::Recorder object associated with the schema.

AUTHOR

Top

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

Top


Fey-ORM-Mock documentation Contained in the Fey-ORM-Mock distribution.

package Fey::Object::Mock::Schema;
BEGIN {
  $Fey::Object::Mock::Schema::VERSION = '0.05';
}

use strict;
use warnings;

use DBD::Mock;

use Moose;

extends 'Fey::Object::Schema';

# It'd be nice to use MooseX::ClassAttribute, but then we end up with
# a metaclass incompatibility, and shit blows up.
{
    my %Recorders;

    sub Recorder {
        my $class = shift;

        return $Recorders{$class};
    }

    sub SetRecorder {
        my $class = shift;

        $Recorders{$class} = shift;
    }
}

no Moose;

__PACKAGE__->meta()->make_immutable();

1;

# ABSTRACT: Mock schema class subclass of Fey::Object::Schema




__END__