There should be an easier way to evaluate a string in the restricted DATA sublanguage - by Derp McDerp

Status : 

 


1
0
Sign in
to vote
ID 806384 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 10/23/2013 8:29:58 PM
Access Restriction Public

Description

Invoke-Expression "DATA { $foo }" is too hackish, there should be something like Invoke-Expression $foo -Data instead, e.g.:

function Invoke-Expression {
	[CmdletBinding()]
	param(
		[Parameter(Mandatory, Position=0)]
		[string]$Command
,
		[Parameter(ParameteSetName="Data")]
		[string[]]$SupportedCommand
,
		[Parameter(ParameteSetName="Data")]
		[switch]$Data
	)
	...
}
Sign in to post a comment.