Net-API-CPAN

 view release on metacpan or  search on metacpan

build/build_modules.pl  view on Meta::CPAN

    {
        $all_methods->push( keys( %{$other_methods->{ $object }} ) );
    }
    if( scalar( keys( %$core_methods ) ) )
    {
        $all_methods->push( keys( %$core_methods ) );
    }
    
    my $sample_file = $base_dir->child( "$object.json" );
    my $sample_data;
    $sample_data = $sample_file->load_json( boolean_values => [\0, \1] ) if( $sample_file->exists );
    my $synop = Module::Generic::Array->new;
    if( defined( $sample_data ) )
    {
        my $args_string = &dump_this( $sample_data );
        $synop->push( "my \$obj = ${base_class}::${module_name}->new( $args_string ) || die( ${base_class}::${module_name}->error );\n" );
    }
    
    my $lines = Module::Generic::Array->new;
    my $pod = Module::Generic::Array->new;
    my $code = <<EOT;

lib/Net/API/CPAN/Mock.pm  view on Meta::CPAN

    my $checksum = $file->checksum_md5;
    if( $self->{checksum} &&
        $self->{checksum} eq $checksum &&
        $self->{specs} &&
        ref( $self->{specs} ) eq 'HASH' &&
        scalar( keys( %{$self->{specs}} ) ) )
    {
        warn( "Called to reprocess the OpenAPI specification, but we already have a cache, so re-using the cache instead.\n" ) if( $self->_is_warnings_enabled );
        return( $self );
    }
    my $specs = $file->load_json( boolean_values => [0,1] ) || return( $self->pass_error( $file->error ) );
    my $paths = $specs->{paths} || return( $self->error( "No 'paths' property found in the openapi specifications provided." ) );
    return( $self->error( "The 'paths' property found is not an hash reference." ) ) if( !defined( $paths ) || ref( $paths ) ne 'HASH' );
    $self->{specs} = $specs;
    $self->{checksum} = $file->checksum_md5;
    my $def = {};
    
    my $seen = {};
    my $processed = {};

    # NOTE: resolve_ref()



( run in 0.376 second using v1.01-cache-2.11-cpan-9ff20fc0ed8 )