Do helper functions in a NuGet Packages init.ps1 have to be global?
I'm wanting to write a couple commands for the [NuGet package manager][1] console to insert [Gists from GitHub][2].  I have 4 basic commands

 - **List-Gists** 'user' 
 - **Gist-Info** 'gistId'
 - **Gist-Contents** 'gistId' 'fileName'
 - **Gist-Insert** 'gistId' 'fileName'

All of my commands depend on a couple utility functions, and I'm struggling with whether they need to be global or not.

    # Json Parser
    function parseJson([string]$json, [bool]$throwError = $true) {    
        try {
            $result = $serializer.DeserializeObject( $json );    
            return $result;
        } catch {                
            if($throwError) { throw "ERROR: Parsing Error"}
            else { return $null }            
        }
    }

    function downloadString([string]$stringUrl) {
        try {        
            return $webClient.DownloadString($stringUrl)
        } catch {         
            throw "ERROR: Problem downloading from $stringUrl"
        }
    }
    
    function parseUrl([string]$url) {
        return parseJson(downloadString($url));
    }

Can I just have these utility functions outside of my global functions, or will I need to include them in each of the global functions definition scope somehow?

  [1]: http://nuget.org
  [2]: http://gist.github.com
Do helper functions in a NuGet Packages init.ps1 have to be global?
===

I'm wanting to write a couple commands for the [NuGet package manager][1] console to insert [Gists from GitHub][2].  I have 4 basic commands

 - **List-Gists** 'user' 
 - **Gist-Info** 'gistId'
 - **Gist-Contents** 'gistId' 'fileName'
 - **Gist-Insert** 'gistId' 'fileName'

All of my commands depend on a couple utility functions, and I'm struggling with whether they need to be global or not.

    # Json Parser
    function parseJson([string]$json, [bool]$throwError = $true) {    
        try {
            $result = $serializer.DeserializeObject( $json );    
            return $result;
        } catch {                
            if($throwError) { throw "ERROR: Parsing Error"}
            else { return $null }            
        }
    }

    function downloadString([string]$stringUrl) {
        try {        
            return $webClient.DownloadString($stringUrl)
        } catch {         
            throw "ERROR: Problem downloading from $stringUrl"
        }
    }
    
    function parseUrl([string]$url) {
        return parseJson(downloadString($url));
    }

Can I just have these utility functions outside of my global functions, or will I need to include them in each of the global functions definition scope somehow?

  [1]: http://nuget.org
  [2]: http://gist.github.com