SimpleDeclare v1.0
The Simple Development Library packages and procedures declaration
Project: the Simple Development Library.
::Simple::Declare::cget
::Simple::Declare::configure
declare-package
package ?-version version? ?-project string? ?-synopsis string? ?-module choice? ?-overview string? ?-usage string? ?-api string? ?-exportedcommands qualifiedname-list? ?-aliases list-list? ?-keywords list? ?-examples string? ?-paradigm choice? ?-namespaces namespace-list? ?-error declaration? ?-type declaration? ?-class declaration? ?-variable declaration? ?-command declaration? ?-option declaration? ?-requisites packagerequisite-list? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-cmid string? ?-sprs string? ?-smrs string? ?-history string? ?-copyright string? ?-install script? ?-uninstall script? ?-firsttimeinstall script?declare-proc
procedure ?-version version? ?-project string? ?-synopsis string? ?-overview string? ?-access choice? ?-alias name? ?-arguments extendedarg-list? ?-returns string? ?-parseflags extbool? ?-checktype extbool? ?-keywords list? ?-examples string? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-history string? ?-copyright string? ?-body script?::Simple::Declare::REQUIRES-NAMESPACES
::Simple::Declare::OPTION-ARRAY
::Simple::Declare::PRIV-PROC-IN-NON-PRIV-NAMESPACE
::Simple::Declare::NON-PRIV-PROC-IN-PRIV-NAMESPACE
::Simple::Declare::EXPORTED-OR-ALIASED-GLOBAL-PROC
::Simple::Declare::NOT-DECLARED-AS-EXPORTED
::Simple::Declare::DECLARED-AS-EXPORTED
::Simple::Declare::NOT-DECLARED-AS-ALIAS
::Simple::Declare::DECLARED-AS-ALIAS
::Simple::Declare::ALIAS-NAMESPACE-NOT-THAT-OF-THE-COMMAND
::Simple::Declare::NON-EXISTING-OPTION
::Simple::Declare::CLASS-IN-NON-OBJECT-PACKAGE
::Simple::Declare::NO-NON-EXTRA-PACKAGE
::Simple::Declare::FLAG-NOT-ALLOWED-EXTRA
::Simple::Declare::NAMESPACE-NOT-OWNED
::Simple::Declare::cget
::Simple::Declare::configure
declare-package
package ?-version version? ?-project string? ?-synopsis string? ?-module choice? ?-overview string? ?-usage string? ?-api string? ?-exportedcommands qualifiedname-list? ?-aliases list-list? ?-keywords list? ?-examples string? ?-paradigm choice? ?-namespaces namespace-list? ?-error declaration? ?-type declaration? ?-class declaration? ?-variable declaration? ?-command declaration? ?-option declaration? ?-requisites packagerequisite-list? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-cmid string? ?-sprs string? ?-smrs string? ?-history string? ?-copyright string? ?-install script? ?-uninstall script? ?-firsttimeinstall script?declare-proc
procedure ?-version version? ?-project string? ?-synopsis string? ?-overview string? ?-access choice? ?-alias name? ?-arguments extendedarg-list? ?-returns string? ?-parseflags extbool? ?-checktype extbool? ?-keywords list? ?-examples string? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-history string? ?-copyright string? ?-body script?Synopsis: the Simple Development Library packages and procedures declaration.
Keywords: package, procedure and declaration.
This package provides a way to declare packages and procedures in an homogeneous, easily parseable, fully introspectable way. It allows to substitute the comment block which is usually placed on top of each declaration (as this very same overview!) by Tcl-handled text.
Both items (packages and procedures) can be declared with a single command (declare-package
or declare-proc
, respectively). Every single component needed to either make the item work (such as a procedure argument default value) or to document it (metadata, such as a procedure argument textual description) is provided as arguments to that command. Both items and components can be fully introspected, but metadata is only available if The Simple Development Library -storemetadata option is set when the item is declared.
Use declare-package
to declare a package. Declared packages metadata can be obtained via the ::Simple::Package::information metadata
procedure. Use ::Simple::Package::undeclare
to undeclare the package.
The declare-package
command encompasses the funcionality provided by the ::Simple::Package::declare
command of the SimpleDeclare
package, so it is recommended not to directly use the later.
Use declare-proc
to declare a procedure. Declared procedures metadata given to declare-proc
can be obtained via the ::Simple::Proc::information metadata
procedure. Use ::Simple::Proc::delete
to delete the procedure.
The declare-proc
command encompasses the funcionality provided by the proc-ext
command of the SimpleProc
package, so it is recommended not to use the later. Further, the -command flag of declare-package
allows to declare package commands from within the package declaration, so that declare-proc
should only be used for declaration of commands outside packages, should that be needed.
# Install the package package require SimplePackage ::Simple::Package::require-and-install SimpleDeclare # Let's store the metadata ::Simple::configure -storemetadata true # Declare a package which declares a procedure declare-package { Package } -synopsis { This is the package synopsis. } -namespaces { ::Namespace } -variable { { ::Namespace::Variable } -description { This is a package variable } -value 50 } -error { { ::Namespace::Error } -message { Package error } -explanation { This is a package error. } } -command { { ::Namespace::procedure } -synopsis { This is the procedure synopsis. } -arguments { {-modify boolflag {Whether to modify the package variable}} { variable integer {New package variable value}} } -effects { * Modifies the package variable if -modify is given. } -body { # Must modify the package variable if {[::Simple::Argument::information flaggiven -modify]} { # Modify it set ::Namespace::Variable $variable } # Package variable value too big if {$::Namespace::Variable > 99} { # Throw the package error ::Simple::Error::throw ::Namespace::Error # Correct package variable value } else { # Display it puts "Package variable = $::Namespace::Variable" } } } # Install the package ::Simple::Package::install Package # Invoke the package procedure # This displays the following: # |Package variable = 50 ::Namespace::procedure 77 # This displays the following: # |Package variable = 88 ::Namespace::procedure -modify 88 # This displays the following: # |Package error (::Namespace::Error) catch {::Namespace::procedure -modify 120} result puts "$result ($::errorCode)" # Obtain the package metadata # This displays the following: # |-assumptions = # | -copyright = # | -details = # | -effects = * Modifies the package variable if -modify is given. # | -examples = # | -history = # | -keywords = # |-limitations = # | -overview = # | -project = # | -references = # | -remarks = # | -resources = # | -returns = # | -synopsis = This is the procedure synopsis. # | -todo = # | -version = 1.0 array set metadata [::Simple::Proc::information metadata ::Namespace::procedure] foreach element [lsort [array names metadata]] { puts [format {%12s = %s} -$element $metadata($element)] }
Date | Reason |
10-sep-2001 | First public release, version 0.4 |
20-oct-2001 | Fixed bugs related to types and typed variables, version 0.4.1 |
26-apr-2002 | Fixed bug related to procedure body trimmming, version 0.4.4 |
17-feb-2003 | Second public release, version 0.5 |
22-feb-2003 | Added -command to declare-package , version 0.5.1 |
01-mar-2003 | Added information option* subcommands, version 0.5.2 |
22-mar-2003 | Added -body to declare-proc , version 0.5.3 |
30-mar-2003 | Extra package, version 0.5.4 |
09-jan-2004 | SimpleClass requirement for object packages now optional, version 0.5.5 |
20-jan-2004 | Comments allowed before embedded declarations in declare-package , version 0.5.6 |
18-apr-2004 | Alias can be qualified, version 0.5.7 |
22-jun-2005 | The Simple Development Library version 1.0 |
Copyright (C) 1999-2005, Juan C. Gil (jgil@gmv.es).
Paradigm: procedural.
Requisites: SimpleProc
.
None.
None.
::Simple::Declare
::Simple::Declare::Priv
::Simple::Declare::cget
Synopsis: gets the package options.
Details: see section 4.1.
::Simple::Declare::configure
Synopsis: configures the package options.
Details: see section 4.2.
declare-package
package ?-version version? ?-project string? ?-synopsis string? ?-module choice? ?-overview string? ?-usage string? ?-api string? ?-exportedcommands qualifiedname-list? ?-aliases list-list? ?-keywords list? ?-examples string? ?-paradigm choice? ?-namespaces namespace-list? ?-error declaration? ?-type declaration? ?-class declaration? ?-variable declaration? ?-command declaration? ?-option declaration? ?-requisites packagerequisite-list? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-cmid string? ?-sprs string? ?-smrs string? ?-history string? ?-copyright string? ?-install script? ?-uninstall script? ?-firsttimeinstall script?Synopsis: declares a package.
Details: see section 4.3.
declare-proc
procedure ?-version version? ?-project string? ?-synopsis string? ?-overview string? ?-access choice? ?-alias name? ?-arguments extendedarg-list? ?-returns string? ?-parseflags extbool? ?-checktype extbool? ?-keywords list? ?-examples string? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-history string? ?-copyright string? ?-body script?Synopsis: declares a procedure.
Details: see section 4.4.
::Simple::Declare::REQUIRES-NAMESPACES
Message: flag requires -namespaces.
Explanation: giving the flag flag requires giving the -namespaces flag also.
Corrective action: provide the -namespaces flag in the package declaration.
::Simple::Declare::OPTION-ARRAY
Message: derived array type "type" for option "option".
Explanation: option option has a derived array type type, but that is not allowed.
::Simple::Declare::PRIV-PROC-IN-NON-PRIV-NAMESPACE
Message: private procedure "procedure" can't live in non-private namespace "namespace".
Explanation: the procedure procedure is private because its access mode is "private", but it is living in a non-private namespace namespace not-matching the pattern *::Priv*
.
Corrective action: either declare the procedure as non-private or place it in a private namespace.
::Simple::Declare::NON-PRIV-PROC-IN-PRIV-NAMESPACE
Message: non-private procedure "procedure" can't live in private namespace "namespace".
Explanation: the procedure procedure is non-private because its access mode is not "private", but it is living in a private namespace namespace matching the pattern *::Priv*
.
Corrective action: either declare the procedure as private or place it in a non-private namespace.
::Simple::Declare::EXPORTED-OR-ALIASED-GLOBAL-PROC
Message: exported or aliased global namespace procedure "procedure".
Explanation: a procedure is trying to be exported or aliased from the global namespace, but that is not allowed.
::Simple::Declare::NOT-DECLARED-AS-EXPORTED
Message: package "package" declaration does not include "procedure" as an exported command.
Explanation: exported procedure procedure belongs to package package (because the procedure namespace belongs to the package), but it was not specified as an exported command when the package was declared (flag -exportedcommands of ::Simple::Package::declare
or declare-package
).
Corrective action: either declare the procedure non-exported, add the command to the -exportedcommands list in the package declaration or remove the -exportedcommands flag.
::Simple::Declare::DECLARED-AS-EXPORTED
Message: package "package" declaration includes "procedure" as an exported command.
Explanation: non-exported procedure procedure belongs to package package (because the procedure namespace belongs to the package), but it was specified as an exported command when the package was declared (flag -exportedcommands of ::Simple::Package::declare
or declare-package
).
Corrective action: either declare the procedure exported, delete the command from the -exportedcommands list in the package declaration or remove the -exportedcommands flag.
::Simple::Declare::NOT-DECLARED-AS-ALIAS
Message: package "package" declaration does not include "alias" as an alias for command "procedure".
Explanation: procedure procedure belongs to package package (because the procedure namespace belongs to the package) and it is declared with an alias for alias, but this alias was not specified when the package was declared (flag -aliases of ::Simple::Package::declare
or declare-package
).
Corrective action: either declare the procedure non-aliased, add the alias to the -aliases list in the package declaration or remove the -aliases flag.
::Simple::Declare::DECLARED-AS-ALIAS
Message: package "package" declaration includes "alias" as an alias for command "procedure".
Explanation: procedure procedure belongs to package package (because the procedure namespace belongs to the package) and it is declared with no alias, but alias alias was specified when the package was declared (flag -aliases of ::Simple::Package::declare
or declare-package
).
Corrective action: either declare the procedure as aliased, delete the alias from the -aliases list in the package declaration or remove the -aliases flag.
::Simple::Declare::ALIAS-NAMESPACE-NOT-THAT-OF-THE-COMMAND
Message: alias namespace "command alias" is not that of the command "command".
Explanation: a command alias is qualified with a namespace which is not that of the command, but that is not allowed.
Corrective action: either make the alias unqualified or use the command namespace.
::Simple::Declare::NON-EXISTING-OPTION
Message: package "package" doesn't have an option "bad option".
Explanation: package package does not have an option named bad option.
Corrective action: provide an option from the package list of options.
::Simple::Declare::CLASS-IN-NON-OBJECT-PACKAGE
Message: class declaration in non-object package.
Explanation: a class has tried to be declared in a package whose paradigm is not object.
Corrective action: either delete the -class flags in the package declaration or ensure its -paradigm is "object".
::Simple::Declare::NO-NON-EXTRA-PACKAGE
Message: non-extra package "package" is not declared.
Explanation: an extra package is being declared, but the non-extra one, package, has not been declared before.
Corrective action: ensure the non-extra package is declared before the extra one.
::Simple::Declare::FLAG-NOT-ALLOWED-EXTRA
Message: flag "flag" not allowed in extra package.
Explanation: the flag flag is not allowed in extra packages.
::Simple::Declare::NAMESPACE-NOT-OWNED
Message: class namespace "class" not owned by package "package" nor any of its requisites.
Explanation: class class in package package has tried to be declared in a namespace not owned by the package nor any of its direct requisites.
Corrective action: either place the class in a different namespace, add the namespace to the package namespaces or add the package owning the namespace to the package list of requisites.
None.
::Simple::Declare::cget
Synopsis: gets the package options.
Access mode: public.
Arguments: none.
Returns: the requested option value or the whole list of options if none specified.
::Simple::Declare::configure
Synopsis: configures the package options.
Access mode: public.
Arguments: none.
Returns: the "package with no options" error is thrown.
declare-package
package ?-version version? ?-project string? ?-synopsis string? ?-module choice? ?-overview string? ?-usage string? ?-api string? ?-exportedcommands qualifiedname-list? ?-aliases list-list? ?-keywords list? ?-examples string? ?-paradigm choice? ?-namespaces namespace-list? ?-error declaration? ?-type declaration? ?-class declaration? ?-variable declaration? ?-command declaration? ?-option declaration? ?-requisites packagerequisite-list? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-cmid string? ?-sprs string? ?-smrs string? ?-history string? ?-copyright string? ?-install script? ?-uninstall script? ?-firsttimeinstall script?(Exported from ::Simple::Declare
).
Synopsis: declares a package.
Access mode: exported.
Keywords: package and declaration.
This procedure provides a way to declare packages. It acts as an interface to ::Simple::Package::declare
to which the package, -version, -requisites, -namespaces, -exportedcommands, -aliases, -install, -uninstall and -firsttimeinstall arguments are passed.
The -synopsis flag is mandatory.
The -module flag can be set to either "implementation", "test", "extra" or "demonstration", specifying whether the Tcl package is the actual package implementation, the test package (see simpletest
), the extra package or a demonstration package. For extra packages, several flags are forbidden. In addition, extra packages classes can live in and aliases can point to the namespaces of the non-extra one plus those of its directly required packages.
The -paradigm flag can be set to either "procedural" or "object". Object packages imply the loading of SimpleClass
, and allow the declaration of package classes.
The -variable flag allows to create package variables. Its argument is a variable declaration intended to be the arguments of a call to ::Simple::Variable::declare
. This flag can be given multiple times.
The -option flag allows to create package options. Its argument is an option declaration. The first element is the option flag and the rest is intended to be the arguments of a call to ::Simple::Variable::declare
but for the variable name. A value is required for each option, so that option declarations must have a -value flag. Derived array types are not allowed for options. Options are internally stored in the package main namespace (that is the first namespace in the list of the package namespaces). For this reason, giving the -option flag requires the -namespaces flag also. This flag can be given multiple times. The package options values are configured and got via the configure
and cget
package commands, respectively. These two procedures must currently be created by the user.
The -type flag allows to declare package types. Its argument is a type declaration intended to be the arguments of a call to ::Simple::Type::declare
. This flag can be given multiple times.
The -error flag allows to declare package errors. Its argument is an error declaration intended to be the arguments of a call to ::Simple::Error::declare
. This flag can be given multiple times.
The -command flag allows to declare package commands. Its argument is a command declaration intended to be the arguments of a call to ::Simple::Declare::declare-proc
. This flag can be given multiple times.
The -class flag allows to declare package classes. Its argument is a class declaration intended to be the arguments of a call to ::Simple::Class::declare-class
. This flag can be given multiple times. The classes must live in either one of the package namespaces or to in a namespace belonging to one of the package direct requisites.
The variables, options, types and errors are created in the package install script and deleted in the package uninstall script, so that uninstalling and then reinstalling a package resets them all. Uninstalling a package also deletes all the objects of the package classes.
The commands and classes are created in the package first time install script, so that they are deleted upon deleting the corresponding namespaces, which is only done when the package is undeclared.
All other arguments are metadata, and are stored or ignored depending on whether The Simple Development Library -storemetadata option is set when the package is declared, but for the -api and -firsttimeinstall flags which are never stored.
Arguments: (flag parsing disabled)
Argument | Type | Default value/ choices | Description |
package | unqualifiedname | (n/a) | Package name |
?-version? | version | 1.0 | Package version |
?-project? | string | (empty string) | Package project |
?-synopsis? | string | (empty string) | Package synopsis |
?-module? | choice | implementation, test, extra or demonstration | Package module |
?-overview? | string | (empty string) | Package overview |
?-usage? | string | (empty string) | Package usage message |
?-api? | string | (empty string) | Package API |
?-exportedcommands? | qualifiedname-list | (empty string) | Package qualified exported commands |
?-aliases? | list-list | (empty string) | Package aliases in the format {aliasName aliasedCommand} |
?-keywords? | list | (empty string) | Package keywords |
?-examples? | string | (empty string) | Package usage examples |
?-paradigm? | choice | procedural or object | Package paradigm |
?-namespaces? | namespace-list | (empty string) | Package namespaces |
?-error? | declaration | (empty string) | Package error declaration |
?-type? | declaration | (empty string) | Package type declaration |
?-class? | declaration | (empty string) | Package class declaration |
?-variable? | declaration | (empty string) | Package variable declaration |
?-command? | declaration | (empty string) | Package command declaration |
?-option? | declaration | (empty string) | Package option declaration |
?-requisites? | packagerequisite-list | (empty string) | Package requisites |
?-assumptions? | string | (empty string) | Package assumptions |
?-resources? | string | (empty string) | Package required resources |
?-limitations? | string | (empty string) | Package limitations |
?-effects? | string | (empty string) | Package effects |
?-details? | string | (empty string) | Package implementation details |
?-references? | string | (empty string) | Package references |
?-remarks? | string | (empty string) | Package remarks |
?-todo? | string | (empty string) | Package to do list |
?-cmid? | string | (empty string) | Package configuration management identification |
?-sprs? | string | (empty string) | Package software problem reports |
?-smrs? | string | (empty string) | Package software modification reports |
?-history? | string | (empty string) | Package history |
?-copyright? | string | (empty string) | Package copyright notice |
?-install? | script | (empty string) | Package install script |
?-uninstall? | script | (empty string) | Package uninstall script |
?-firsttimeinstall? | script | (empty string) | Package first time install script |
Returns: the empty string.
Effects:
Creates the package namespaces.
Requires the required packages.
Exports exported commands from their namespaces.
Provides the package.
Package options are stored in a variable named %Options%(flag) (where flag is the option flag) in the package main namespace.
The ::Simple::Package::declare
procedure.
The -namespaces, -exportedcommands, -aliases, -requisites and -option flags are forbidden for "extra" packages.
The -aliases and -exportedcommands are optional but, if given, their contents must exactly match the actual aliases and exported commands within the package, respectively.
The order of the flags is irrelevant but their parameters can not start by an hyphen.
declare-proc
procedure ?-version version? ?-project string? ?-synopsis string? ?-overview string? ?-access choice? ?-alias name? ?-arguments extendedarg-list? ?-returns string? ?-parseflags extbool? ?-checktype extbool? ?-keywords list? ?-examples string? ?-assumptions string? ?-resources string? ?-limitations string? ?-effects string? ?-details string? ?-references string? ?-remarks string? ?-todo string? ?-history string? ?-copyright string? ?-body script?(Exported from ::Simple::Declare
).
Synopsis: declares a procedure.
Access mode: exported.
Keywords: procedure and declaration.
This procedure provides a way to declare other procedures. It acts as an interface to ::Simple::Proc::create
to which the -parseflags, -checktype, procedure, -arguments and -body arguments are passed.
The -synopsis flag is mandatory.
If -access is not given, it is set to either "private" or "public" depending on whether the namespace is private or not, respectively; private namespaces are those matching the pattern *::Priv
. If given, an error is thrown if a public procedure is placed in a private namespace or viceversa.
If the -access mode is "exported" and the procedure namespace is not the global one, the procedure must be exported from its namespace and imported into the global one. If the procedure does not belong to a declared package (because the command namespace does not belong to any declared package), the export and import into the global namespace is performed here; otherwise it is the package declaration responsibility to perform the import and the export, and the procedure must have been specified as an exported command when the package was declared (flag -exportedcommands of ::Simple::Package::declare
or declare-package
; the flag is optional in the later case), otherwise an error is thrown. If a command was included in the -exportedcommands list of its package declaration but it is not declared as exported here, an error is thrown as well.
If the -alias flag is given, an alias for the procedure must be created. If the procedure does not belong to a declared package (because the command namespace does not belong to any declared package), the alias is created here; otherwise it is the package declaration responsibility to create the alias, and the alias must have been specified when the package was declared (flag -aliases of ::Simple::Package::declare
or declare-package
; the flag is optional in the later case), otherwise an error is thrown. In any case, the alias must be unqualified or qualified, but in the later case the namespace must be that of the command.
All other arguments are metadata, and are ignored or stored depending on whether The Simple Development Library -storemetadata option is set when the package is declared.
# A procedure exported into the global namespace declare-proc { ::foo::bar } -synopsis { An example of exported procedure. } -access { exported } -arguments { { int1 integer {First argument}} {-flag float 1.0 {A flag}} { int2 integer {Second argument}} { int3 integer {Third argument}} } -checktype { true } -body { exported puts "int1 = <$int1>" puts "flag = <$flag> " puts "int2 = <$int2>" puts "int3 = <$int3>" }
Arguments: (flag parsing disabled)
Argument | Type | Default value/ choices | Description |
procedure | commandname | (n/a) | Command name |
?-version? | version | 1.0 | Command version |
?-project? | string | (empty string) | Command project |
?-synopsis? | string | (empty string) | Command synopsis |
?-overview? | string | (empty string) | Command overview |
?-access? | choice | public, private or exported | Command access mode |
?-alias? | name | (n/a) | Command alias |
?-arguments? | extendedarg-list | (empty string) | Command arguments |
?-returns? | string | (empty string) | Command return value |
?-parseflags? | extbool | true | Whether to enable flag parsing or delegate it to the user |
?-checktype? | extbool | false | Whether to enable argument run-time type checking for this procedure |
?-keywords? | list | (empty string) | Command keywords |
?-examples? | string | (empty string) | Command usage examples |
?-assumptions? | string | (empty string) | Command assumptions |
?-resources? | string | (empty string) | Command required resources |
?-limitations? | string | (empty string) | Command limitations |
?-effects? | string | (empty string) | Command effects |
?-details? | string | (empty string) | Command implementation details |
?-references? | string | (empty string) | Command references |
?-remarks? | string | (empty string) | Command remarks |
?-todo? | string | (empty string) | Command to do list |
?-history? | string | (empty string) | Command history |
?-copyright? | string | (empty string) | Command copyright notice |
?-body? | script | (empty string) | Command body |
Returns: a list with the following elements:
0 | the procedure declaration and creation script. |
1 | the procedure install script. |
Effects:
Creates the procedure named procedure.
If the procedure -access mode is "exported", the procedure namespace is not the global one and the procedure does not belong to a declared package, the procedure is exported from its namespace and imported into the global one.
If the -alias flag is given and the procedure does not belong to a declared package, an alias for the procedure is created.
The ::Simple::Proc::create
procedure.
The order of the -parseflags and -checktype flags is irrelevant but must appear before the procedure name.
The order of the other flags is irrelevant also but must appear after the procedure name and their parameters can not start by an hyphen.