X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FZeal%2FDocset.pm;h=d3e013bd0dbb49c4247e1d36817b27d5b765276e;hb=1a477fa4fdc40fd4142e2a01ff12865381cd7d8e;hp=88c52e284b2f5d09e764cf518a2bdca05d06a7d3;hpb=0469af4b76d7a33b0de2fcc696928b22a53099b9;p=zeal.git diff --git a/lib/Zeal/Docset.pm b/lib/Zeal/Docset.pm index 88c52e2..d3e013b 100644 --- a/lib/Zeal/Docset.pm +++ b/lib/Zeal/Docset.pm @@ -4,7 +4,7 @@ use 5.014000; use strict; use warnings; -our $VERSION = '0.000_001'; +our $VERSION = '0.001'; use parent qw/Class::Accessor::Fast/; __PACKAGE__->mk_ro_accessors(qw/path plist dbh name id family/); @@ -40,7 +40,11 @@ sub new { sub _blessdocs { my ($self, $docsref) = @_; - map { Zeal::Document->new(+{%$_, docset => $self}) } @$docsref; + map { + my %hash = (%$_, docset => $self); + ($hash{path}, $hash{anchor}) = split /#/s, $hash{path}; + Zeal::Document->new(\%hash); + } @$docsref; } sub fetch { @@ -173,7 +177,7 @@ Marius Gavrilescu, Emarius@ieval.roE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2014 by Marius Gavrilescu +Copyright (C) 2014-2015 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.1 or,