I tried this in a Catalyst powered application, using DBIx and SimpleXML:

sub index :Path :Args(0) {
    my ($self, $c) = @_;
    my $i = 0;
    my $transactions = [$c->model('DB::pbgeneralledger')->search({}, {})];
    $c->stash->{template} = 'ledger.xsl';
    $c->stash->{xml} = XMLout($transactions);
    $c->forward( $c->view('XSLT') );
}

I got an error I’d never seen before:

circular data structures not supported

I found this page about Perl data structures:

Looks like a good read.