use XML::Pastor; my $pastor = XML::Pastor->new(); # Generate MULTIPLE modules, one module for each class, and put them under destination. $pastor->generate( mode =>'offline', style => 'multiple', schema=>'/some/path/to/schema.xsd', class_prefix=>'MyApp::Data::', destination=>'/tmp/lib/perl/', ); # Generate a SINGLE module which contains all the classes and put it under destination. # Note that the schema may be read from a URL too. $pastor->generate( mode =>'offline', style => 'single', schema=>'http://some/url/to/schema.xsd', class_prefix=>'MyApp::Data::', module => 'Module', destination=>'/tmp/lib/perl/', ); # Generate classes in MEMORY, and EVALUATE the generated code on the fly. # (Run Time code generation) $pastor->generate( mode =>'eval', schema=>'/some/path/to/schema.xsd', class_prefix=>'MyApp::Data::' ); # Same thing, with a maximum of DEBUG output on STDERR $pastor->generate( mode =>'eval', schema=>'/some/path/to/schema.xsd', class_prefix=>'MyApp::Data::', verbose = 9 );