Subject: | write_file() method does not appear to respect type selection |
Distibution: Bookmarks-Parser-0.01
perl version: 5.8.5
OS/version: Linux - 2.6.8.1-12mdk
Sample code:
#!/usr/bin/perl -w
use strict;
use utf8;
use Bookmarks::Parser;
use Data::Dumper;
$| = 1;
my $bm_file = q{bookmarks.html};
my $parser = Bookmarks::Parser->new();
my $bookmarks = $parser->parse( { filename => $bm_file } );
$bookmarks->write_file( { filename => q{test1.html}, type => q{netscape}
} );
$bookmarks->write_file( { filename => q{test2.html}, type => q{opera} } );
$bookmarks->write_file( { filename => q{test3.html}, type => q{xml} } );
Expected results:
Files would differ in some manner.
Actual results:
$ md5sum bookmarks.html test?.html
3539340217f41cea6de94b78db3cbba4 bookmarks.html
138a927e81dad3439e72be690be9a43b test1.html
138a927e81dad3439e72be690be9a43b test2.html
138a927e81dad3439e72be690be9a43b test3.html
$ head -7 test1.html
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
$ head -7 test2.html
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
$ head -7 test3.html
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>