in reply to Two argument bless sometimes ignores the class name?
Frankly, this code does not do what I would expect it to to do.
Maybe its just getting late, but I am not sure I see why this is odd. You are not duplicating the contents of the TYPEGLOB, but just aliasing it. It's just a level of indirection, not a copy of the package. In fact, just changing one line to this:
Gives me this output%Bar:: = %Foo::;
Which is exactly what I would expect. And while I do agree the behavior you describe is not very clear, I am not sure I would have expected it to work without issue.Expected class: Bar Actual class: Bar Expected class: Bar Actual class: Bar
|
|---|