| 1 | package DBIx::dbMan::Extension; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | our $VERSION = '0.06'; | ||
| 6 | |||
| 7 | 1; | ||
| 8 | |||
| 9 | # identification: author-module-version | ||
| 10 | sub IDENTIFICATION { return "000001-000001-000006"; } | ||
| 11 | |||
| 12 | # author list: | ||
| 13 | # 000001 Milan Sorm <sorm@is4u.cz> | ||
| 14 | # 000002 Frantisek Darena <darena@mendelu.cz> | ||
| 15 | # 000003 Ales Kutin <kutin@is4u.cz> | ||
| 16 | # 000004 Ondrej 'Kepi' Kudlik <kepi@igloonet.cz> | ||
| 17 | # 000005 Tomas Klein <klein@is4u.cz> | ||
| 18 | # 999999 test user (not for redistributable) | ||
| 19 | |||
| 20 | # dbMan use only one instance from author-module with the highest version | ||
| 21 | # module 000001-000001 can't be loaded (not override IDENTIFICATION) | ||
| 22 | |||
| 23 | sub new { | ||
| 24 | my $class = shift; | ||
| 25 | my $obj = bless { @_ }, $class; | ||
| 26 | return $obj; | ||
| 27 | } | ||
| 28 | |||
| 29 | sub preference { return 0; } | ||
| 30 | # higher value, higher priority in calling | ||
| 31 | # <0 fallback modules | ||
| 32 | # 0- 999 low priority - lowlevel (database) interface | ||
| 33 | # 1000-1999 medium priority - command parsers | ||
| 34 | # 2000-2999 high priority - preprocessors | ||
| 35 | # 3000- super priority | ||
| 36 | |||
| 37 | sub for_version { return ('0.21',''); } | ||
| 38 | |||
| 39 | sub known_actions { return undef; } | ||
| 40 | |||
| 41 | sub init { }; | ||
| 42 | |||
| 43 | sub done { }; | ||
| 44 | |||
| 45 | sub menu { }; | ||
| 46 | |||
| 47 | sub load_ok { return 1; }; | ||
| 48 | |||
| 49 | # handle_action must set processed to 1 if done | ||
| 50 | # otherwise new handling of action in all extensions will be started | ||
| 51 | sub handle_action { | ||
| 52 | my ($obj,%action) = @_; | ||
| 53 | $action{processed} = 1; | ||
| 54 | return %action; | ||
| 55 | } |