| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | package KiokuDB::Backend::Role::Clear; | ||
| 4 | 21 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 21 | ▶ | use namespace::clean -except => 'meta'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 21 | requires "clear"; | |
| 9 | |||
| 10 | 21 | __PACKAGE__ | |
| 11 | |||
| 12 | __END__ | ||
| 13 | |||
| 14 | =pod | ||
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | KiokuDB::Backend::Role::Clear - Backend clearing api | ||
| 19 | |||
| 20 | =head1 SYNOPSIS | ||
| 21 | |||
| 22 | package KiokuDB::Backend::MySpecialBackend; | ||
| 23 | use Moose; | ||
| 24 | |||
| 25 | use namespace::clean -except => 'meta'; | ||
| 26 | |||
| 27 | with qw( | ||
| 28 | KiokuDB::Backend | ||
| 29 | KiokuDB::Backend::Role::Clear | ||
| 30 | ); | ||
| 31 | |||
| 32 | sub clear { | ||
| 33 | ... | ||
| 34 | } | ||
| 35 | |||
| 36 | =head1 DESCRIPTION | ||
| 37 | |||
| 38 | This backend role provides an api for removing all entries from a backend. | ||
| 39 | |||
| 40 | This is optionally used by the dump loader script, and parts of the test suite. | ||
| 41 | |||
| 42 | =head1 REQUIRED METHODS | ||
| 43 | |||
| 44 | =over 4 | ||
| 45 | |||
| 46 | =item clear | ||
| 47 | |||
| 48 | This method should clear all entries in the backend. | ||
| 49 | |||
| 50 | =back | ||