App-Basis-ConvertText2

 view release on metacpan or  search on metacpan

lib/App/Basis/ConvertText2/Plugin/Barcode.pm  view on Meta::CPAN


        # let the caller put the block back together
        return undef;
    }

    # we can use the cache or process everything ourselves
    my $sig = create_sig( $content, $params );
    my $filename = cachefile( $cachedir, "$sig.png" );
    if ( !-f $filename ) {
        my $gdb ;
        # sometimes it throws out some warnings, lets hide them
        my ($stdout, $stderr, @result) = capture {
            $gdb = GD::Barcode->new( $type, $content, $qrcode );
        } ;
        if ( !$gdb ) {
            warn "warning $tag $params->{type}: " .  $GD::Barcode::errStr;
            return undef;
        }
        my $gd = $gdb->plot( NoText => $params->{notext}, Height => $params->{height} );
        path($filename)->spew_raw( $gd->png );



( run in 0.248 second using v1.01-cache-2.11-cpan-496ff517765 )