out.println( "\n# Attribute definitions\n");  HashMap attributes = theClass.getAttributes(); out.println( "my %fields = (" ); for ( Iterator it = attributes.values().iterator(); it.hasNext(); ) { Attribute attribute = (Attribute) it.next(); out.print( "    " + attribute.getName() + " => undef" ); if ( it.hasNext() ) out.println( "," ); } out.println( "\n);");    out.println( "\n# Default constructor\n"); out.println( "sub new {\n" + "    my $class = shift;\n" + "    my $self = { %fields };\n" + "    bless $self, $class;\n" + "    return $self;\n" + "}");    out.flush(); out.close(); */ }
String className = theClass.getName();  }
        private static void buildPackage( org.jdns.xtuml.metamodel.Class theClass, File outDir )            throws IOException {                                    // create the file for the output source                        String className = theClass.getName();           /*                         PrintWriter out = new PrintWriter( outDir.getAbsolutePath() + "/" + className + ".pm" );                        out.println( "use Object;");            out.println( "use XMLserV2;");            out.println( "use Carp;");                                                out.println("package " + className +";");                        out.println( "@ISA = qw( Object XMLserV2 );");            out.println( "Ser::registerClass( \"" + className +"\" );" );            out.println( "\n# Attribute definitions\n");                        HashMap attributes = theClass.getAttributes();            out.println( "my %fields = (" );            for ( Iterator it = attributes.values().iterator(); it.hasNext(); ) {		Attribute attribute = (Attribute) it.next();		out.print( "    " + attribute.getName() + " => undef" );                if ( it.hasNext() )                    out.println( "," );            }            out.println( "\n);");                        // standard PERL constructor                        out.println( "\n# Default constructor\n");            out.println(                 "sub new {\n" +                "    my $class = shift;\n" +                "    my $self = { %fields };\n" +                "    bless $self, $class;\n" +                "    return $self;\n" +                "}");                        // close the source file                        out.flush();            out.close();	    */        }