New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tuning delegated arguments (i.e. exclude some, change defaulting mode...) #71
Comments
hkoba
changed the title
Allow changing defaulting mode of type(delegate) arguments
Allow tuning delegated arguments (i.e. exclude some, change defaulting mode...)
Feb 22, 2016
hkoba
added a commit
that referenced
this issue
Feb 22, 2016
* -excluded_var in delegate argument is supported.
hkoba
added a commit
that referenced
this issue
Feb 23, 2016
hkoba
added a commit
that referenced
this issue
Jun 17, 2017
Changelog diff is: diff --git a/Changes b/Changes index 0f97f43..5b253f2 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,46 @@ Revision history for YATT::Lite +0.101_001 2017-06-17 + * (Possibly breaking) API changes + - [GH #84] Now yatt:args "/URL/{PATTERN}" is tested in written order. + - [GH #64] Use c3 mro for widget search by default. + + * New/changed YATT Declarations + - [GH #54] <!yatt:base "file_or_directory"> + - [GH #14] <!yatt:action "/URL/{PATTERN}"> + + * New/changed YATT Entities + - [GH #92] &yatt:script_name(); now respects Apache's Action+AddHandler + - [GH #74] &yatt:param(); is now equiv of &yatt:CON:param();. + - [GH #73] &yatt:coalesce(); now behaves like SQL's coalesce(). + - [GH #70] &yatt:file_location(); and &yatt:is_current_page(page) + + * Enhancement + - [GH #91] Better error reporting for XHF parser + - [GH #82] Add support for bufferedstreaming in raised response. + - [GH #80] Allow declaring types for routed args + - [GH #79] Site-wide special_entities + - [GH #71] Now delegate type can have argument list. + - [GH #69] YATT::Lite::Macro is now visible from subclasses. + - [GH #63] `Action NAME => SUB` support in `.htyattrc.pl` + + * Miscellaneous helper functions. + - [GH #94] YATT::Lite::XHF->read_all() + - [GH #90] WebMVC0::Connection->delete_param + - [GH #82] Lite::Connection->raise_response($psgi_response). + - [GH #68] YATT::Lite::Factory->wrapped_by($outer_app) for Plack::Middleware. + + * Bug fixes + - [GH #93] yatt:action arg detection should care DOS crlf too. + - [GH #83] Fix for bug "Safety level may not be changed inside a transaction" + - [GH #77] :CON:mkquery() now encode utf8 correctly. + - [GH #76] yatt:my code works for wide chars. + - [GH #75] Avoid use of error.ytmpl until code-generator becomes ready. + - [GH #74] Now yatt.render sets :CON:param() too. + - [GH #72] BUG: "Inconsistent hierarchy during C3 merge" occurs for complex inheritance. + - [GH #61] Adapt sprintf redundant arg warnings(5.22) + + 0.101 2016-05-24 * Just tagged 0.101 (from 0.100_003)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In yatt widget declaration, an argument can be declared as a delegate type like following:
Above means a declaration of new widget
foo
, which has two delegate type argumentslist
andlabel
. With these delegate type, the widget 'foo' will getmylist
andlabel
(except previously declared same name arguments, which are just ignored).list
andlabel
becomes usable in definition scope of this 'foo' widget. When mylist is called, all arguments imported to the widget 'foo' (except explicitly specified in argument list of 'list' call) are automatically passed through to the real call of mylist too. (Same rule applies tolabel
too.).This automatic argument passing is quite useful to reduce copying argument declaration list from widget to widget. But there was one annoying conflict with another yatt feature: argument defaulting mode
!
(means required). For example, imagine abovemylist
is declared with required argumentid
like following:In this case, argument 'id' becomes required argument of 'foo' too, even if you explicitly give
the argument 'id' to the call of pseudo widget
list
. This is quite messy.So, I decided to add two more features for delegate type.
[delegate foo bar]
), each specified spec overrides original definition of same name argument.[delegate -foo]
), specified argument is not imported at all.With this new feature, you can rewrite our problem like following:
You can change defaulting mode/default value too like following:
The text was updated successfully, but these errors were encountered: