package Ernad::Indat::Sucis; use strict; use warnings; use base 'Ernad::Indat'; use Carp qw(confess); use Clone 'clone'; use Data::Dumper; use File::Basename; use Ernad::Indat::Sborn; use Ernad::Indat::Issue; use Ernad::Dates; use Ernad::Store; use Krichel::Shoti; our $e=$main::e; sub go { my $i=shift; my $ii=Ernad::Indat::Issue->new(); my $jsons=$ii->list('complete'); foreach my $json (@$jsons) { my $bana=basename($json); my $date=substr($bana,0,10); my $v=$i->{'i'}->{$date}->{'v'} // $Krichel::Shoti::start; my $json_shoti=&Ernad::Dates::mshoti($json); if(&Krichel::Shoti::compare_strict($v,$json_shoti)) { $i->{'i'}->{'d'}->{$date}->{'d'}=&Ernad::Store::load($json); $i->{'i'}->{'d'}->{$date}->{'v'}=$json_shoti; } last; } print Dumper $i->{'i'}->{'d'}; } 1;