| 1 | package CXC::Form::Tiny::Plugin::OptArgs2; | ||
| 2 | |||
| 3 | # ABSTRACT: A Plugin to interface Form::Tiny with OptArgs2 | ||
| 4 | |||
| 5 | 6 | ▶ | use v5.20; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 6 | ▶ | use experimental 'signatures', 'postderef'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 6 | our $VERSION = '0.12'; | |
| 11 | |||
| 12 | 6 | ▶ | use parent 'Form::Tiny::Plugin'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | ## no critic (Subroutines::ProtectPrivateSubs) | ||
| 15 | |||
| 16 | 15 | ▶ | sub plugin ( $self, $caller, $context ) { |
|
Subroutine
plugin: called CC=1 SCAR=0.0
Pod
documented
| |||
| 17 | return { | ||
| 18 | roles => [ q{CXC::Form::Tiny::Plugin::OptArgs2::Class}, ], | ||
| 19 | meta_roles => [ q{CXC::Form::Tiny::Plugin::OptArgs2::Meta}, ], | ||
| 20 | subs => { | ||
| 21 | 31 | ▶ | option => sub ( @options ) { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 22 | 31 | $caller->form_meta->_dsl_add_option( $context->$*, @options ); | |
| 23 | }, | ||
| 24 | |||
| 25 | 4 | ▶ | argument => sub ( @options ) { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 26 | 4 | $caller->form_meta->_dsl_add_argument( $context->$*, @options ); | |
| 27 | }, | ||
| 28 | |||
| 29 | 6 | ▶ | optargs_opts => sub ( @options ) { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 30 | 6 | $caller->form_meta->_dsl_optargs_opts( $context->$*, @options ); | |
| 31 | }, | ||
| 32 | |||
| 33 | }, | ||
| 34 | |||
| 35 | 15 | }; | |
| 36 | } | ||
| 37 | |||
| 38 | # | ||
| 39 | # This file is part of CXC-Form-Tiny-Plugin-OptArgs2 | ||
| 40 | # | ||
| 41 | # This software is Copyright (c) 2023 by Smithsonian Astrophysical Observatory. | ||
| 42 | # | ||
| 43 | # This is free software, licensed under: | ||
| 44 | # | ||
| 45 | # The GNU General Public License, Version 3, June 2007 | ||
| 46 | # | ||
| 47 | |||
| 48 | 6 | 1; | |
| 49 | |||
| 50 | __END__ | ||