I would want to understand the difference between a .m file and .mi file in Perl/Mason.
As per the mason components docs:
.mi - internal component. An internal component can only be accessed from other components.
I can see that i can call specific methods in written in a .mi file by
$m->comp('test.mi:randomMethod', arg1=> 'blah')
Can i do the same for my .m file as well ? As all the existing places i searched online . i only found a file with no methods and the entire file is executed when called.
$m->comp('test.m', arg1=> 'blah')
runs the entire file as it has no methods.
So,
I want to know the difference between both file extensions
Can i have methods similar to .mi file in .m file and call those methods specifically?
When should i choose .m file and when .mi file ?