Compat CFML
This module allows your BoxLang engine to run as an Adobe CFML engine or a Lucee CFML engine
Welcome to the BoxLang Compatibility Module For CFML
This module will allow your ColdFusion (CFML) applications under Adobe or Lucee to run under BoxLang. This module will provide the necessary compatibility layer to run your applications under BoxLang.
If there are any issues, please report them to the BoxLang JIRA or the Module Issues repository.
# For Operating Systems using our Quick Installer.
install-bx-module bx-compat-cfml
# Using CommandBox to install for web servers.
box install bx-compat-cfml
Settings
Here are the available settings for the compat module:
settings = {
// Choose your engine: adobe or lucee
engine = "lucee",
clientManagement = false,
clientStorage = "cookie",
clientTimeout = createTimeSpan( 0, 1, 0, 0 ),
// Mimic the CF behavior of nulls being undefined. Set this to false to have full null support
nullIsUndefined = true,
// Mimic the CF and Lucee 5 behavior of boolean true/false being 1/0 and usable in math operations.
// Also affects the isNumeric() BIF. To match Lucee 6, set this to false.
booleansAreNumbers = true,
// JSON control character auto-escaping flag
// IF you turn to true, be aware that the entire JSON serialization will be escaped and be slower.
jsonEscapeControlCharacters = true,
// This simulates the query to empty value that Adobe/Lucee do when NOT in full null support
// We default it to true to simulate Adobe/Lucee behavior
queryNullToEmpty = true,
// The CF -> BL AST transpiler settings
// The transpiler is in the core, but will eventually live in this module, so the settings are here.
transpiler = {
// Turn foo.bar into foo.BAR
upperCaseKeys = true,
// Add output=true to functions and classes
forceOutputTrue = true,
// Merged doc comments into actual function, class, and property annotations
mergeDocsIntoAnnotations = true
}
};
The valid engines are adobe
or lucee
. By default the engine is lucee
. All module settings can be changed via the boxlang.json
in your configuration.
"modules": {
"compat-cfml" : {
"disabled" : false,
"settings" : {
"engine" : "adobe",
// JSON control character auto-escaping flag
// IF you turn to true, be aware that the entire JSON serialization will be escaped and be slower.
"jsonEscapeControlCharacters" : true,
// This simulates the query to empty value that Adobe/Lucee do when NOT in full null support
// We default it to true to simulate Adobe/Lucee behavior
"queryNullToEmpty" : true,
// The CF -> BL AST transpiler settings
// The transpiler is in the core, but will eventually live in this module, so the settings are here.
"transpiler" : {
// Turn foo.bar into foo.BAR
"upperCaseKeys" : true,
// Add output=true to functions and classes
"forceOutputTrue" : true,
// Merged doc comments into actual function, class, and property annotations
"mergeDocsIntoAnnotations" : true
}
}
}
}
Server Scope Mimic
Depending on which engine you select an interceptor will be loaded that will seed the server
scope with the appropriate engine details.
Contributed BIFs
The compat module will contribute the following built-in functions globally:
cacheClear
- Learn more here: https://cfdocs.org/cacheClearcacheCount
- Learn more here: https://cfdocs.org/cacheCountcacheGet
- Learn more here: https://cfdocs.org/cacheGetcacheGetAll
- Learn more here: https://cfdocs.org/cacheGetAllcacheGetAllIds
- Learn more here: https://cfdocs.org/cacheGetAllIdscacheGetAsOptional
- Learn more here: https://cfdocs.org/cacheGetAsOptionalcacheGetDefaultCacheName
- Learn more here: https://cfdocs.org/cacheGetDefaultCacheNamecacheGetEngineProperties
- Learn more here: https://cfdocs.org/cacheGetEnginePropertiescacheGetMetadata
- Learn more here: https://cfdocs.org/cacheGetMetadatacacheGetOrFail
- Learn more here: https://cfdocs.org/cacheGetOrFailcacheGetProperties
- Learn more here: https://cfdocs.org/cacheGetPropertiescacheGetSession
- Learn more here: https://cfdocs.org/cacheGetSessioncacheIdExists
- Learn more here: https://cfdocs.org/cacheIdExistscachePut
- Learn more here: https://cfdocs.org/cachePutcacheRegionExists
- Learn more here: https://cfdocs.org/cacheRegionExistscacheRegionNew
- Learn more here: https://cfdocs.org/cacheRegionNewcacheRegionRemove
- Learn more here: https://cfdocs.org/cacheRegionRemovecacheRemove
- Learn more here: https://cfdocs.org/cacheRemovecacheRemoveAll
- Learn more here: https://cfdocs.org/cacheRemoveAllcacheSetProperties
- Learn more here: https://cfdocs.org/cacheSetPropertiesdeleteClientVariable
- Learn more here: https://cfdocs.org/deleteClientVariablegetClientVariablesList
- Learn more here: https://cfdocs.org/getClientVariablesListgetComponentMetadata
- Learn more here: https://cfdocs.org/getComponentMetadatagetMetaData
- Learn more here: https://cfdocs.org/getMetaDatagetVariable
- Learn more here: https://cfdocs.org/getVariablesetVariable
- Learn more here: https://cfdocs.org/setVariablesystemOutput
- Learn more here: https://cfdocs.org/systemOutput
GitHub Repository and Reporting Issues
Visit the GitHub repository for release notes. You can also file a bug report or improvement suggestion via Jira.
Last updated
Was this helpful?