App-Maisha

 view release on metacpan or  search on metacpan

lib/App/Maisha/Plugin/Identica.pm  view on Meta::CPAN

                unless(@access_tokens) {
                    warn "Invalid PIN provided, Maisha will not be able to access your Identica account until authorized to do so\n";
                    return 0;
                }
                $access_tokens->{$config->{username}} = \@access_tokens;

                mkpath( $config->{home} . '/.maisha' );

                # save the access tokens
                store $access_tokens, $datafile;
                chmod 0640, $datafile;  # make sure it has reasonable permissions
            }
        };

        if($@) {
            warn "Unable to login to Identica\n";
            return 0;
        }
    }

    $self->api($api);

lib/App/Maisha/Plugin/Identica.pm  view on Meta::CPAN

                warn "Invalid PIN provided, Maisha will not be able to access direct messages until reauthorization is completed\n";
                return 0;
            }
            $access_tokens->{$config->{username}} = \@access_tokens;

            unlink $datafile;
            mkpath( $config->{home} . '/.maisha' );

            # save the access tokens
            store $access_tokens, $datafile;
            chmod 0640, $datafile;  # make sure it has reasonable permissions
        };

        if($@) {
            warn "Unable to login to Identica\n";
            return 0;
        }
    }

    return 1;
}

lib/App/Maisha/Plugin/Twitter.pm  view on Meta::CPAN

                unless(@access_tokens) {
                    warn "Invalid PIN provided, Maisha will not be able to access your Twitter account until authorized to do so\n";
                    return 0;
                }
                $access_tokens->{$config->{username}} = \@access_tokens;

                mkpath( $config->{home} . '/.maisha' );

                # save the access tokens
                store $access_tokens, $datafile;
                chmod 0640, $datafile;  # make sure it has reasonable permissions
            }
        };

        if($@) {
            warn "Unable to login to Twitter\n";
            return 0;
        }
    }

    $self->api($api);

lib/App/Maisha/Plugin/Twitter.pm  view on Meta::CPAN

                warn "Invalid PIN provided, Maisha will not be able to access direct messages until reauthorization is completed\n";
                return 0;
            }
            $access_tokens->{$config->{username}} = \@access_tokens;

            unlink $datafile;
            mkpath( $config->{home} . '/.maisha' );

            # save the access tokens
            store $access_tokens, $datafile;
            chmod 0640, $datafile;  # make sure it has reasonable permissions
        };

        if($@) {
            warn "Unable to login to Twitter\n";
            return 0;
        }
    }

    return 1;
}



( run in 0.293 second using v1.01-cache-2.11-cpan-8d75d55dd25 )