The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#!/usr/bin/env perl

use Test::More tests => 4;
use Carp;

use strict;
use warnings;
use SVG::Sparkline;

{
    my $w = SVG::Sparkline->new( Whisker => {values=>'++0++0--'} );
    unlike( "$w", qr/xmlns:svg=/, 'no xmlns:svg unless -allns' );
    unlike( "$w", qr/xmlns:xlink=/, 'no xmlns:xlink unless -allns' );
}

{
    my $w = SVG::Sparkline->new( Whisker => {values=>'++0++0--', -allns=>1} );
    like( "$w", qr/xmlns:svg=/, 'no xmlns:svg unless -allns' );
    like( "$w", qr/xmlns:xlink=/, 'no xmlns:xlink unless -allns' );
}