| 1 | package oEdtk::DisseminationPlan; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | our $VERSION = 2.1129; | |||||||||
| 7 | 1 | our @ISA = qw(Exporter); | |||||||||
| 8 | 1 | our @EXPORT_OK = qw(idx1_app_idlot idx1_line call_plan); | |||||||||
| 9 | |||||||||||
| 10 | # The dissemination-plan client is corporate data and now lives in | ||||||||||
| 11 | # oEUser::DisseminationPlan. This generic module is a thin delegate so callers | ||||||||||
| 12 | # using the old oEdtk::DisseminationPlan name keep working. oEUser is an optional | ||||||||||
| 13 | # companion distribution: it is loaded on demand, and a missing one fails cleanly | ||||||||||
| 14 | # rather than breaking the oEdtk load. | ||||||||||
| 15 | 0 | ▶ | sub _delegate { | ||||||||
|
Subroutine
_delegate: not called CC=2 SCAR=17.9
| |||||||||||
| 16 | 0 | my ( $sub, @args ) = @_; | |||||||||
| 17 | 0 | my $loaded; | |||||||||
| 18 | { | ||||||||||
| 19 | 0 | local $SIG{__DIE__}; # a caught die must not reach oEdtk::Tracking's handler | |||||||||
| 20 | 0 | $loaded = eval { require oEUser::DisseminationPlan; 1 }; | |||||||||
| 21 | } | ||||||||||
| 22 | 0 | ▶ | die "oEdtk::DisseminationPlan requires the companion distribution oEUser " | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | . "(oEUser::DisseminationPlan is not installed): $@" | ||||||||||
| 24 | unless $loaded; | ||||||||||
| 25 | 0 | return oEUser::DisseminationPlan->can($sub)->(@args); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub idx1_app_idlot { return _delegate( 'idx1_app_idlot', @_ ) } | ||||||||
|
Subroutine
idx1_app_idlot: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | 0 | ▶ | sub idx1_line { return _delegate( 'idx1_line', @_ ) } | ||||||||
|
Subroutine
idx1_line: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | 0 | ▶ | sub call_plan { return _delegate( 'call_plan', @_ ) } | ||||||||
|
Subroutine
call_plan: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 31 | 0 | ▶ | sub my_ua { return _delegate( 'my_ua', @_ ) } | ||||||||
|
Subroutine
my_ua: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 32 | 0 | ▶ | sub run_http_request { return _delegate( 'run_http_request', @_ ) } | ||||||||
|
Subroutine
run_http_request: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 33 | |||||||||||
| 34 | 1 | 1; | |||||||||
| 35 | |||||||||||
| 36 | =head1 NAME | ||||||||||
| 37 | |||||||||||
| 38 | oEdtk::DisseminationPlan - delegate to the oEUser dissemination-plan client | ||||||||||
| 39 | |||||||||||
| 40 | =head1 SYNOPSIS | ||||||||||
| 41 | |||||||||||
| 42 | use oEdtk::DisseminationPlan qw(idx1_app_idlot); | ||||||||||
| 43 | |||||||||||
| 44 | idx1_app_idlot( $cfg, $app, $id_lot, $forcedpaper ); # see oEUser::DisseminationPlan | ||||||||||
| 45 | |||||||||||
| 46 | =head1 DESCRIPTION | ||||||||||
| 47 | |||||||||||
| 48 | The dissemination-plan client is corporate; it lives in | ||||||||||
| 49 | C<oEUser::DisseminationPlan>. This module keeps the old | ||||||||||
| 50 | C<oEdtk::DisseminationPlan> name available to existing callers and forwards every | ||||||||||
| 51 | function to the companion distribution, which is loaded on demand. When oEUser is | ||||||||||
| 52 | not installed, the call fails with a clear message. | ||||||||||
| 53 | |||||||||||
| 54 | =head1 FUNCTIONS | ||||||||||
| 55 | |||||||||||
| 56 | Every function below forwards its arguments to the same-named function in | ||||||||||
| 57 | C<oEUser::DisseminationPlan> and returns its result: | ||||||||||
| 58 | |||||||||||
| 59 | =over 4 | ||||||||||
| 60 | |||||||||||
| 61 | =item idx1_app_idlot | ||||||||||
| 62 | |||||||||||
| 63 | =item idx1_line | ||||||||||
| 64 | |||||||||||
| 65 | =item call_plan | ||||||||||
| 66 | |||||||||||
| 67 | =item my_ua | ||||||||||
| 68 | |||||||||||
| 69 | =item run_http_request | ||||||||||
| 70 | |||||||||||
| 71 | =back | ||||||||||
| 72 | |||||||||||
| 73 | =head1 AUTHOR | ||||||||||
| 74 | |||||||||||
| 75 | The oEdtk team. | ||||||||||
| 76 | |||||||||||
| 77 | =cut | ||||||||||