# Marshall and Modules

**URL:** <https://www.ruby-forum.com/t/marshall-and-modules/78968>\
**Category:** Ruby\
**Created:** [December 11, 2006, 3:50am UTC](https://www.ruby-forum.com/t/marshall-and-modules/78968 "2006-12-11T03:50:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [December 11, 2006, 3:50am UTC](https://www.ruby-forum.com/t/marshall-and-modules/78968/1 "2006-12-11T03:50:37Z")

</div>

I get loads of problems when using Marshall (ie, in CGI::Session) for  
objects that are in Modules (ie, not defined in the top level  
namespace).

Any rules of thumb here?

---

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [December 11, 2006, 5:26am UTC](https://www.ruby-forum.com/t/marshall-and-modules/78968/2 "2006-12-11T05:26:43Z")

</div>

On Dec 10, 2006, at 18:50 , S. Robert J. wrote:

> I get loads of problems when using Marshall (ie, in CGI::Session) for  
> objects that are in Modules (ie, not defined in the top level  
> namespace).

What kind of problems? Examples?

> Any rules of thumb here?

It should work no fine provided you have all classes loaded at the  
time of Marshal.load.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)

I LIT YOUR GEM ON FIRE!
