NAME

Krang::Desk - Krang Desk API


SYNOPSIS

    use Krang::ClassLoader 'Desk';
    # add a new desk, defaulting to next available slot in order
    my $desk = pkg('Desk')->new( name => 'Publish');
    # return desk id
    my $desk_id = $desk->desk_id;
    # return desk order
    my $desk_order = $desk->order;
    # create another desk, this time choosing order of
    # another desk, effectively making order of other
    # desk + 1
    my $desk2 = pkg('Desk')->new( name => 'Print', order => $desk->order );
    # return desk objects with name 'Publish'
    my @desks = pkg('Desk')->find( name => 'Publish' );
    # reorder desks (in this case switch order of the two we have created)
    pkg('Desk')->reorder(   $desk[0]->desk_id => $desk2->order,
                            $desk2->desk_id => $desk[0]->order );
    $desk->delete();


DESCRIPTION

Krang::Desk provides methods to create, delete, find and reorder desks.


INTERFACE

METHODS