Skip to content

Commit

Permalink
move Pod::Tree::BitBucket and Pod::Tree::StrStream to separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed May 19, 2015
1 parent 9e4cc59 commit c1fd646
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 38 deletions.
9 changes: 9 additions & 0 deletions lib/Pod/Tree/BitBucket.pm
@@ -0,0 +1,9 @@
package Pod::Tree::BitBucket;
use strict;
use warnings;

sub new { bless {}, shift }
sub AUTOLOAD {shift}

1;

44 changes: 6 additions & 38 deletions lib/Pod/Tree/HTML.pm
@@ -1,3 +1,7 @@
package Pod::Tree::HTML;
use strict;
use warnings;

# Copyright (c) 1999-2007 by Steven McDougall. This module is free
# software; you can redistribute it and/or modify it under the same
# terms as Perl itself.
Expand All @@ -8,44 +12,8 @@ use IO::String;
use Pod::Tree;
use Text::Template;

package Pod::Tree::BitBucket;
use strict;
use warnings;

sub new { bless {}, shift }
sub AUTOLOAD {shift}

package Pod::Tree::StrStream;
use strict;
use warnings;

sub new {
my ( $class, $ref ) = @_;

if ($ref) {
return bless $ref, $class;
}
else {
my $st = '';
return bless \$st, $class;
}
}

sub print {
my $st = shift;
$$st .= join( '', @_ );
}

sub get {
my $st = shift;
my $s = $$st;
$$st = '';
$s;
}

package Pod::Tree::HTML;
use strict;
use warnings;
use Pod::Tree::BitBucket;
use Pod::Tree::StrStream;

use constant BGCOLOR => '#ffffff';
use constant TEXT => '#000000';
Expand Down
30 changes: 30 additions & 0 deletions lib/Pod/Tree/StrStream.pm
@@ -0,0 +1,30 @@
package Pod::Tree::StrStream;
use strict;
use warnings;

sub new {
my ( $class, $ref ) = @_;

if ($ref) {
return bless $ref, $class;
}
else {
my $st = '';
return bless \$st, $class;
}
}

sub print {
my $st = shift;
$$st .= join( '', @_ );
}

sub get {
my $st = shift;
my $s = $$st;
$$st = '';
$s;
}

1;

0 comments on commit c1fd646

Please sign in to comment.