Home Dashboard Directory Help
Search

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


Status: 

Active


1
0
Sign in
to vote
Type: Suggestion
ID: 806384
Opened: 10/23/2013 8:29:58 PM
Access Restriction: Public
0
Workaround(s)
view

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
    )
    ...
}
Details
Sign in to post a comment.
Sign in to post a workaround.