PerlSub
public final class PerlSub : PerlValue
Provides a safe wrapper for Perl subroutine (CV
).
Performs reference counting on initialization and deinitialization.
Cheat Sheet
Creation of an anonymous subroutine
my $summer = sub {
my ($lv, $rv) = @_;
return $lv + $rv;
}
let summer = PerlSub {
(lv: Int, rv: Int) -> Int in
return lv + rv
}
In fact, these examples are not fully equal. The Perl version returns a SV pointing to a CV, whereas the Swift version returns just a CV.
Creation of a named subroutine
sub strlen {
return length $_[0];
}
PerlSub(name: "strlen") { (s: String) in
return s.characters.count
}
Calling a subroutine
my $sum = $summer->(10, 20);
let sum = summer.call(10, 20)
-
Short form of
init(dereferencing:)
.Declaration
Swift
public convenience init(_ ref: PerlScalar) throws
-
Returns the specified Perl subroutine with the given name. If the subroutine does not exist then
nil
is returned.Declaration
Swift
public convenience init?(get name: String, perl: PerlInterpreter = .current)
-
A textual representation of the CV, suitable for debugging.
Declaration
Swift
public override var debugDescription: String
-
Arguments passed to a subroutine.
See moreDeclaration
Swift
public struct Args : RandomAccessCollection
-
A copy of values returned from a Perl subroutine.
See moreDeclaration
Swift
public final class ReturnValues : RandomAccessCollection
-
Calls the Perl subroutine by its name.
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(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.VoidContext = .void, perl: PerlInterpreter = .current) throws -> Void
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.VoidContext = .void) throws -> Void
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.VoidContext = .void, perl: PerlInterpreter = .current) throws -> Void
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.VoidContext = .void) throws -> Void
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar, perl: PerlInterpreter = .current) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> R
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> R?
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext = .array, perl: PerlInterpreter = .current) throws -> (R0, R1)
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext = .array) throws -> (R0, R1)
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext = .array, perl: PerlInterpreter = .current) throws -> (R0, R1)
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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>(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext = .array) throws -> (R0, R1)
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: String, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> PerlSub.ReturnValues
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: PerlScalar, args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> PerlSub.ReturnValues
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: String, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext, perl: PerlInterpreter = .current) throws -> PerlSub.ReturnValues
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the Perl subroutine by its name.
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(_ name: PerlScalar, _ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> PerlSub.ReturnValues
Parameters
name
The name of the subroutine.
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call(args: [PerlScalarConvertible?], context: PerlSub.VoidContext = .void) throws -> Void
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call(_ args: PerlScalarConvertible?..., context: PerlSub.VoidContext = .void) throws -> Void
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar) throws -> R
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(_ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar) throws -> R
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(args: [PerlScalarConvertible?], context: PerlSub.ScalarContext = .scalar) throws -> R?
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(_ args: PerlScalarConvertible?..., context: PerlSub.ScalarContext = .scalar) throws -> R?
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> R
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(_ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> R
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> R?
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R : PerlScalarConvertible>(_ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> R?
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R0 : PerlScalarConvertible, R1 : PerlScalarConvertible>(args: [PerlScalarConvertible?], context: PerlSub.ArrayContext = .array) throws -> (R0, R1)
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call<R0 : PerlScalarConvertible, R1 : PerlScalarConvertible>(_ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext = .array) throws -> (R0, R1)
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call(args: [PerlScalarConvertible?], context: PerlSub.ArrayContext) throws -> PerlSub.ReturnValues
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Calls the underlain Perl subroutine.
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 func call(_ args: PerlScalarConvertible?..., context: PerlSub.ArrayContext) throws -> PerlSub.ReturnValues
Parameters
args
Arguments to pass to the Perl subroutine.
context
Context of the call.
Return Value
Values returned by the Perl subroutine converted to requested Swift types.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init(name: String? = nil, file: StaticString = #file, body: @escaping () throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init(name: String? = nil, file: StaticString = #file, body: @escaping () throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init(name: String? = nil, file: StaticString = #file, body: @escaping () throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, P2) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, P2) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, P2) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, P2) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, P2?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, P2?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, P2?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, P2?) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, P2) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, P2) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, P2) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, P2) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, P2?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, P2?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, P2?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, P2?) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, P2) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, P2) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, P2) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, P2) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, P2?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, P2?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, P2?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, P2: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, P2?) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping ([T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping ([T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping ([T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, [T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, [T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, [T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, [T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, [T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, [T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, [T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, [T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, [T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, [T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, [T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, [T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, [T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping ([String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping ([String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping ([String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, [String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, [String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, [String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, [String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, [String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, [String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, [String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, [String: T]) throws -> ())
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, [String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, [String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, [String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, [String: T]) throws -> (PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0, P1?, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
A body of the XSUB requires a fully qualified prototype of function to correctly convert Perl values to their Swift counterparts. 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 convenience init<P0: PerlScalarConvertible, P1: PerlScalarConvertible, T: PerlScalarConvertible>(name: String? = nil, file: StaticString = #file, body: @escaping (P0?, P1?, [String: T]) throws -> (PerlScalarConvertible?, PerlScalarConvertible?))
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.
-
Creates a new Perl XSUB.
This is the last resort variant of subroutine construction. A body of the subroutine will receive all subroutine’s 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
Swift
public convenience init(name: String? = nil, file: StaticString = #file, body: @escaping (Args) throws -> [PerlScalarConvertible?])
Parameters
name
A fully qualified name of the subroutine under which it will be accessible in Perl. If not specified (or
nil
passed) then anonymous subroutine will be created.file
A name of a source file subroutine was declared in. Used for debug purposes only.
body
The body of the XSUB.