#!/usr/bin/perl -w package Local::Xmldoom::Javascript; use base qw(Test::Class); use File::Temp qw/ tempfile /; use Test::More; use Xmldoom::ORB::Definition; use strict; use test::BookStore::Object; use Data::Dumper; sub new { my $class = shift; my $self = $class->SUPER::new(@_); # TODO: attampt to detect these things, or get them from some kind of # config file or environment variables. $self->{rhino} = 'jsscript-1.6'; $self->{dojo_path} = 'share/javascript/dojo/'; $self->{xmlsax_path} = 'share/javascript/xmlsax.js'; $self->{xmlw3cdom_path} = 'share/javascript/xmlw3cdom.js'; bless $self, $class; return $self; } sub startup : Test(startup) { my $self = shift; if ( not -e $self->{dojo_path} ) { die "You need to download the dojo *source* (http://dojotoolkit.org) and put it at $self->{dojo_path}"; } if ( not -e $self->{xmlsax_path} or not -e $self->{xmlw3cdom_path} ) { die "You need to download 'XML for