PerlNamedClass
public protocol PerlNamedClass : class
A class having Perl representation.
-
A name of the class in Perl.
Declaration
Swift
static var perlClassName: String
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: String, args: [PerlScalarConvertible?], context: PerlSub.VoidContext = .void, perl: PerlInterpreter = .current) throws -> Void
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.VoidContext = .void) throws -> Void
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.VoidContext = .void, perl: PerlInterpreter = .current) throws -> Void
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.VoidContext = .void) throws -> Void
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> R
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R : PerlScalarConvertible>(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> R?
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R0 : PerlScalarConvertible, R1 : PerlScalarConvertible>(method: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext = .array, perl: PerlInterpreter = .current) throws -> (R0, R1)
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R0 : PerlScalarConvertible, R1 : PerlScalarConvertible>(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext = .array) throws -> (R0, R1)
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R0 : PerlScalarConvertible, R1 : PerlScalarConvertible>(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext = .array, perl: PerlInterpreter = .current) throws -> (R0, R1)
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call<R0 : PerlScalarConvertible, R1 : PerlScalarConvertible>(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext = .array) throws -> (R0, R1)
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> PerlSub.ReturnValues
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:args:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> PerlSub.ReturnValues
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:perl:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> PerlSub.ReturnValues
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
call(method:_:context:)
Extension methodCalls the Perl method specified by
perlClassName
attribute on the current class.The arguments of the call will be automagically converted to mortalized Perl scalar values with the lifetime of the scope of this call. The similar thing will happen to the Perl return values: they will be destroyed before the call returns (but after conversion to Swift values was done).
Declaration
Swift
public static func call(method: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> PerlSub.ReturnValues
Parameters
method
The name of the method to call.
args
Arguments to pass to the Perl method.
context
Context of the call.
Return Value
Values returned by the Perl method converted to requested Swift types.
-
require(perl:)
Extension methodLoads the module which name is in
perlClassName
attribute.Declaration
Swift
public static func require(perl: PerlInterpreter = .current) throws
-
register()
Extension methodRegisters this class as a counterpart of Perl class which name is provided in
perlClassName
.Declaration
Swift
public static func register()
-
initialize(perl:)
Extension methodAssuming that the Perl class is in the module with the same name, loads it and registers.
Declaration
Swift
public static func initialize(perl: PerlInterpreter = .current) throws
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod(_ method: String, file: StaticString = #file, body: @escaping () throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod(_ method: String, file: StaticString = #file, body: @escaping () throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod(_ method: String, file: StaticString = #file, body: @escaping () throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, P2) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, P2) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, P2?) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, P2?) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, P2) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, P2) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, P2?) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, P2?) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, P2) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, P2) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, P2?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, P2?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping ([T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping ([T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping ([T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, [T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, [T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, [T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, [T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, [T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, [T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping ([String: T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping ([String: T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping ([String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, [String: T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, [String: T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, [String: T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, [String: T]) throws -> ()) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, [String: T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, [String: T]) throws -> (PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.A body of the method requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. The first argument should follow Perl OOP conventions and contain object
$self
in case of an instance method or string$class
in case of a class. Arguments of the subroutine are copied. If a body throws then an error is propagated to Perl as a Perl exception (die
).Declaration
Swift
public static func createPerlMethod<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(_ method: String, file: StaticString = #file, body: @escaping (P0, P1?, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?)) -> PerlSub
Parameters
method
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
createPerlMethod(_:file:body:)
Extension methodCreates a new method in the Perl class specified in
perlClassName
attribute.This is the last resort variant of subroutine construction. A body of the subroutine will receive all subroutine arguments as an array of
PerlScalar
values and should return collection ofPerlScalar
s as its result. All examinations of concrete values types should be performed manually. Arguments of the subroutine are not copied. Any modification of them will be visible outside the call.Declaration
Parameters
name
A name of the method under which it will be accessible in Perl.
file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.