Private/Get-ModuleRootFileName.ps1

function Get-ModuleRootFileName {
    <#
.SYNOPSIS
    Gets the PstModules ModuleRootFileName variable
.DESCRIPTION
    Gets the PstModules ModuleRootFileName variable amd writes the output
.EXAMPLE
    Get-ModuleRootFileName
#>

    begin {
        Write-Debug -Message "Begin '$($MyInvocation.MyCommand.Name)' at '$(Get-Date)'"
    }
    process {
        try {
            Write-Information -Message "Get variable 'ModuleRootFileName'"
            Write-Output $Script:ModuleRootFileName
        }
        catch {
            if ($_.Exception -and $_.Exception.Message) {
                Write-Error "An error occurred: $($_.Exception.Message)"
            } else {
                Write-Error "An error occurred, but no additional information is available."
            }
        }
    }
    end {
        if ($?) {
            Write-Debug -Message "End '$($MyInvocation.MyCommand.Name)' at '$(Get-Date)'"
        }
    }
}